FOSSology
4.4.0
Open Source License Compliance by Open Source Software
|
These are common functions for the file picker and the diff tools. More...
Go to the source code of this file.
Functions | |
FuzzyCmp ($Master1, $Master2) | |
FuzzyName comparison function for diff tools. More... | |
MakeMaster ($Children1, $Children2) | |
Generate the master array with aligned children. More... | |
FileList (&$Master, $agent_pk1, $agent_pk2, $filter, $plugin, $uploadtree_pk1, $uploadtree_pk2) | |
Adds the element linkurl to the $Master elements. More... | |
GetDiffLink ($MasterRow, $side, $agent_pk, $filter, $plugin, $ModLicView, $uploadtree_pk1, $uploadtree_pk2) | |
Generate the link for one side of a diff element. More... | |
NextUploadtree_pk ($A_pk, $B_pk) | |
Given an uploadtree_pk in tree A ($A_pk), find the similarly named one that is immediately under the uploadtree_pk in tree B ($B_pk). More... | |
FuzzyName (&$Children) | |
Add fuzzyname and fuzzynameext to $Children. More... | |
Dir2BrowseDiff ($Path1, $Path2, $filter, $Column, $plugin) | |
Return a string which is a linked path to the file. More... | |
These are common functions for the file picker and the diff tools.
Definition in file common-compare.php.
Dir2BrowseDiff | ( | $Path1, | |
$Path2, | |||
$filter, | |||
$Column, | |||
$plugin | |||
) |
Return a string which is a linked path to the file.
This is a modified Dir2Browse() to support browsediff links.
array | $Path1 | Path array for tree 1 |
array | $Path2 | Path array for tree 2 |
string | $filter | Filter portion of URL, optional |
int | $Column | Which path is being emitted, column 1 or 2 |
Plugin | $plugin | Plugin pointer of the caller ($this) |
Definition at line 336 of file common-compare.php.
FileList | ( | & | $Master, |
$agent_pk1, | |||
$agent_pk2, | |||
$filter, | |||
$plugin, | |||
$uploadtree_pk1, | |||
$uploadtree_pk2 | |||
) |
Adds the element linkurl to the $Master elements.
linkurl - this is the entire formatted href inclusive <a to /a>
array | $Master | Master |
int | $agent_pk1 | Agent id 1 |
int | $agent_pk2 | Agent id 2 |
string | $filter | Filter |
string | $plugin | Mod name |
int | $uploadtree_pk1 | Uploadtree id 1 |
int | $uploadtree_pk2 | Uploadtree id 2 |
Definition at line 142 of file common-compare.php.
FuzzyCmp | ( | $Master1, | |
$Master2 | |||
) |
FuzzyName comparison function for diff tools.
array | $Master1 | Master1 to compare |
array | $Master2 | Master2 to compare |
Definition at line 23 of file common-compare.php.
FuzzyName | ( | & | $Children | ) |
Add fuzzyname and fuzzynameext to $Children.
The fuzzy name is used to do fuzzy matches. In this implementation the fuzzyname is just the filename with numbers, punctuation, and the file extension removed. fuzzynameext is the same as fuzzyname but with the file extension.
$Children | child list |
Definition at line 304 of file common-compare.php.
GetDiffLink | ( | $MasterRow, | |
$side, | |||
$agent_pk, | |||
$filter, | |||
$plugin, | |||
$ModLicView, | |||
$uploadtree_pk1, | |||
$uploadtree_pk2 | |||
) |
Generate the link for one side of a diff element.
array | $MasterRow | Master row |
int | $side | |
int | $agent_pk | Agent id |
string | $filter | Filter |
string | $plugin | Mod name |
Plugin | $ModLicView | |
int | $uploadtree_pk1 | Uploadtree pk1 |
int | $uploadtree_pk2 | Uploadtree pk2 |
Definition at line 178 of file common-compare.php.
MakeMaster | ( | $Children1, | |
$Children2 | |||
) |
Generate the master array with aligned children.
Each row contains aligning child records.
$Master[n][1]
= child 1 row
$Master[n][2]
= child 2 row
If $Sort is true, the master rows are sorted by fuzzy name.
If $Sort is false, the master rows are unsorted.
array | $Children1 | Child 1 row |
array | $Children2 | Child 2 row |
Definition at line 47 of file common-compare.php.
NextUploadtree_pk | ( | $A_pk, | |
$B_pk | |||
) |
Given an uploadtree_pk in tree A ($A_pk), find the similarly named one that is immediately under the uploadtree_pk in tree B ($B_pk).
int | $A_pk | Tree A uploadtree_pk |
int | $B_pk | Tree B uploadtree_pk |
Definition at line 256 of file common-compare.php.