mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-07 18:18:18 +01:00
Fix file_get_contents() does not use "r", str_replace (PhanTypeMismatchArgumentInternal)
This commit is contained in:
@@ -94,7 +94,7 @@ function rebuildObjectClass($destdir, $module, $objectname, $newmask, $readdir =
|
|||||||
dol_copy($pathoffiletoedittarget, $pathoffiletoedittarget.'.back', $newmask, 1);
|
dol_copy($pathoffiletoedittarget, $pathoffiletoedittarget.'.back', $newmask, 1);
|
||||||
|
|
||||||
// Edit class files
|
// Edit class files
|
||||||
$contentclass = file_get_contents(dol_osencode($pathoffiletoeditsrc), 'r');
|
$contentclass = file_get_contents(dol_osencode($pathoffiletoeditsrc));
|
||||||
|
|
||||||
// Update ->fields (to add or remove entries defined into $addfieldentry)
|
// Update ->fields (to add or remove entries defined into $addfieldentry)
|
||||||
if (count($object->fields)) {
|
if (count($object->fields)) {
|
||||||
@@ -321,7 +321,7 @@ function rebuildObjectSql($destdir, $module, $objectname, $newmask, $readdir = '
|
|||||||
// Backup old file
|
// Backup old file
|
||||||
dol_copy($pathoffiletoedittarget, $pathoffiletoedittarget.'.back', $newmask, 1);
|
dol_copy($pathoffiletoedittarget, $pathoffiletoedittarget.'.back', $newmask, 1);
|
||||||
|
|
||||||
$contentsql = file_get_contents(dol_osencode($pathoffiletoeditsrc), 'r');
|
$contentsql = file_get_contents(dol_osencode($pathoffiletoeditsrc));
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$texttoinsert = '-- BEGIN MODULEBUILDER FIELDS'."\n";
|
$texttoinsert = '-- BEGIN MODULEBUILDER FIELDS'."\n";
|
||||||
@@ -389,7 +389,7 @@ function rebuildObjectSql($destdir, $module, $objectname, $newmask, $readdir = '
|
|||||||
$pathoffiletoedittarget = preg_replace('/\.sql$/', '.key.sql', $pathoffiletoedittarget);
|
$pathoffiletoedittarget = preg_replace('/\.sql$/', '.key.sql', $pathoffiletoedittarget);
|
||||||
$pathoffiletoedittarget = preg_replace('/\.sql.new$/', '.key.sql.new', $pathoffiletoedittarget);
|
$pathoffiletoedittarget = preg_replace('/\.sql.new$/', '.key.sql.new', $pathoffiletoedittarget);
|
||||||
|
|
||||||
$contentsql = file_get_contents(dol_osencode($pathoffiletoeditsrc), 'r');
|
$contentsql = file_get_contents(dol_osencode($pathoffiletoeditsrc));
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$texttoinsert = '-- BEGIN MODULEBUILDER INDEXES'."\n";
|
$texttoinsert = '-- BEGIN MODULEBUILDER INDEXES'."\n";
|
||||||
@@ -898,7 +898,7 @@ function writePermsInAsciiDoc($file, $destfile)
|
|||||||
$array = explode(";", $content);
|
$array = explode(";", $content);
|
||||||
$permissions = array_filter($array);
|
$permissions = array_filter($array);
|
||||||
// delete occurrences "$r++" and ID
|
// delete occurrences "$r++" and ID
|
||||||
$permissions = str_replace('$r++', 1, $permissions);
|
$permissions = str_replace('$r++', '1', $permissions);
|
||||||
|
|
||||||
$permsN = array();
|
$permsN = array();
|
||||||
foreach ($permissions as $i => $element) {
|
foreach ($permissions as $i => $element) {
|
||||||
|
|||||||
Reference in New Issue
Block a user