FOSSology  4.4.0
Open Source License Compliance by Open Source Software
fo_mapping_license.php File Reference

Replase the old license shortname with new license shortname. More...

Go to the source code of this file.

Functions

 renameLicenses21to22 ($verbose)
 Create map of old_shortname to new_shortname for 2.1 to 2.2 and call renameLicenses. More...
 
 renameLicensesForSpdxValidation ($verbose)
 Create map of old_shortname to new_shortname for SPDX and call renameLicenses. More...
 
 renameLicenses ($shortname_array, $Verbose)
 Rename old shortname to new shortname. More...
 
 check_shortname ($shortname)
 check if the shortname is existing in license_ref table More...
 
 update_license ($old_rf_pk, $new_rf_pk)
 update license from old to new 1) update license_file set rf_fk=new_rf_pk where rf_fk=old_rf_pk 2) update license_file_audit set rf_fk=new_rf_pk where rf_fk=old_rf_pk 3) delete from license_ref where rf_pk=old_rf_pk More...
 
 change_license_name ($old_shortname, $new_shortname)
 change license shortname More...
 

Detailed Description

Replase the old license shortname with new license shortname.

This should be called by fossinit and dbmigrate_2.1-2.2.

Definition in file fo_mapping_license.php.

Function Documentation

◆ change_license_name()

change_license_name (   $old_shortname,
  $new_shortname 
)

change license shortname

Parameters
string$old_shortname- old license shortname
string$new_shortname- new license shortname
Returns
int 0 on sucess

Definition at line 577 of file fo_mapping_license.php.

◆ check_shortname()

check_shortname (   $shortname)

check if the shortname is existing in license_ref table

Parameters
string$shortname- the license which you want to check
Returns
int rf_id on existing; -1 on not existing

Definition at line 502 of file fo_mapping_license.php.

◆ renameLicenses()

renameLicenses (   $shortname_array,
  $Verbose 
)

Rename old shortname to new shortname.

Parameters
mixed$shortname_arrayMap of short names [old_shortname]=>new_shortname
boolean$VerbosePrint job info if TRUE

Definition at line 459 of file fo_mapping_license.php.

◆ renameLicenses21to22()

renameLicenses21to22 (   $verbose)

Create map of old_shortname to new_shortname for 2.1 to 2.2 and call renameLicenses.

Parameters
boolean$verbosePrint job info if TRUE

replace

change

replase

change

replace

change

replace

change

replace

change

Sleepycat's license text is incorrect

replace

change

Definition at line 43 of file fo_mapping_license.php.

◆ renameLicensesForSpdxValidation()

renameLicensesForSpdxValidation (   $verbose)

Create map of old_shortname to new_shortname for SPDX and call renameLicenses.

Parameters
boolean$verbosePrint job info if TRUE

Definition at line 395 of file fo_mapping_license.php.

◆ update_license()

update_license (   $old_rf_pk,
  $new_rf_pk 
)

update license from old to new 1) update license_file set rf_fk=new_rf_pk where rf_fk=old_rf_pk 2) update license_file_audit set rf_fk=new_rf_pk where rf_fk=old_rf_pk 3) delete from license_ref where rf_pk=old_rf_pk

Parameters
int$old_rf_pk- the rf_pk of old license shortname
int$new_rf_pk- the rf_pk of new license shortname
Returns
int 0 on sucess

transaction begin

delete data of old license

transaction end

Definition at line 525 of file fo_mapping_license.php.