mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-03 07:32:32 +01:00
Qual: Spelling htdocs/core (#27491)
Highlights: - initialY in pdf_standard.modules.php was unused - remove (otherwise -> initially) (+same in other file)
This commit is contained in:
@@ -534,7 +534,7 @@ function compareFirstValue($a, $b)
|
||||
* @param array|null $right $right to update or add
|
||||
* @param string|null $objectname name of object
|
||||
* @param string|null $module name of module
|
||||
* @param int $action 0 for delete, 1 for add, 2 for update, -1 when delete object completly, -2 for generate rights after add
|
||||
* @param int $action 0 for delete, 1 for add, 2 for update, -1 when delete object completely, -2 for generate rights after add
|
||||
* @return int 1 if OK,-1 if KO
|
||||
*/
|
||||
function reWriteAllPermissions($file, $permissions, $key, $right, $objectname, $module, $action)
|
||||
@@ -610,7 +610,7 @@ function reWriteAllPermissions($file, $permissions, $key, $right, $objectname, $
|
||||
$permissions = $perms_grouped;
|
||||
|
||||
|
||||
// parcourir les objets
|
||||
// parcourir les objects
|
||||
$o=0;
|
||||
foreach ($permissions as &$object) {
|
||||
// récupérer la permission de l'objet
|
||||
@@ -639,9 +639,9 @@ function reWriteAllPermissions($file, $permissions, $key, $right, $objectname, $
|
||||
}
|
||||
}
|
||||
$rights_str = implode("", $rights);
|
||||
// delete all permission from file
|
||||
// delete all permissions from file
|
||||
deletePerms($file);
|
||||
// rewrite all permission again
|
||||
// rewrite all permissions again
|
||||
dolReplaceInFile($file, array('/* BEGIN MODULEBUILDER PERMISSIONS */' => '/* BEGIN MODULEBUILDER PERMISSIONS */'."\n\t\t".$rights_str));
|
||||
return 1;
|
||||
} else {
|
||||
@@ -859,7 +859,7 @@ function getFromFile($file, $start, $end)
|
||||
function writePermsInAsciiDoc($file, $destfile)
|
||||
{
|
||||
global $langs;
|
||||
//search and get all permssion in stirng
|
||||
//search and get all permissions in string
|
||||
$start = '/* BEGIN MODULEBUILDER PERMISSIONS */';
|
||||
$end = '/* END MODULEBUILDER PERMISSIONS */';
|
||||
$content = getFromFile($file, $start, $end);
|
||||
@@ -951,7 +951,7 @@ function addObjectsToApiFile($file, $objects, $modulename)
|
||||
$varcomented = "@var MyObject \$myobject {@type MyObject}";
|
||||
$constructObj = "\$this->myobject = new MyObject(\$this->db);";
|
||||
|
||||
// add properties and declare them in consturctor
|
||||
// add properties and declare them in constructor
|
||||
foreach ($content as $lineNumber => &$lineContent) {
|
||||
if (strpos($lineContent, $varcomented) !== false) {
|
||||
$lineContent = '';
|
||||
@@ -995,7 +995,7 @@ function addObjectsToApiFile($file, $objects, $modulename)
|
||||
/**
|
||||
* Remove Object variables and methods from API_Module File
|
||||
* @param string $file file api module
|
||||
* @param string $objectname name of object whant to remove
|
||||
* @param string $objectname name of object want to remove
|
||||
* @param string $modulename name of module
|
||||
* @return int 1 if OK, -1 if KO
|
||||
*/
|
||||
@@ -1055,10 +1055,10 @@ function reWriteAllMenus($file, $menus, $menuWantTo, $key, $action)
|
||||
return -1;
|
||||
}
|
||||
if ($action == 0 && !empty($key)) {
|
||||
// delete menu manuelly
|
||||
// delete menu manually
|
||||
array_splice($menus, array_search($menus[$key], $menus), 1);
|
||||
} elseif ($action == 1) {
|
||||
// add menu manualy
|
||||
// add menu manually
|
||||
array_push($menus, $menuWantTo);
|
||||
} elseif ($action == 2 && !empty($key) && !empty($menuWantTo)) {
|
||||
// update right from permissions array
|
||||
@@ -1255,7 +1255,7 @@ function createNewDictionnary($modulename, $file, $namedic, $dictionnaires = nul
|
||||
}
|
||||
}
|
||||
|
||||
// rewrite dictionnary if
|
||||
// rewrite dictionary if
|
||||
$dictionnaires['langs'] = $modulename.'@'.$modulename;
|
||||
$dictionnaires['tabname'][] = strtolower($namedic);
|
||||
$dictionnaires['tablib'][] = ucfirst(substr($namedic, 2));
|
||||
@@ -1276,7 +1276,7 @@ function createNewDictionnary($modulename, $file, $namedic, $dictionnaires = nul
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate Urls and add them to documentaion module
|
||||
* Generate Urls and add them to documentation module
|
||||
*
|
||||
* @param string $file_api filename or path of api
|
||||
* @param string $file_doc filename or path of documentation
|
||||
@@ -1315,7 +1315,7 @@ function writeApiUrlsInDoc($file_api, $file_doc)
|
||||
$error++;
|
||||
}
|
||||
|
||||
// buil format asciidoc for urls in table
|
||||
// build format asciidoc for urls in table
|
||||
if (!$error) {
|
||||
$asciiDocTable = "[options=\"header\"]\n|===\n|Objet | URLs\n";
|
||||
foreach ($groupedUrls as $objectName => $urls) {
|
||||
|
||||
Reference in New Issue
Block a user