|
@@ -1190,7 +1190,7 @@ discard block |
|
|
block discarded – undo |
|
1190
|
1190
|
$stringtoexport = str_replace('file=logos%2Fthumbs%2F'.$mysoc->logo, "file=logos%2Fthumbs%2F__LOGO_KEY__", $stringtoexport); |
|
1191
|
1191
|
|
|
1192
|
1192
|
if (getDolGlobalString('WEBSITE_EXPORT_SQL_ON_SEVERAL_LINES')) { |
|
1193
|
|
- $line .= "/* new line */\n"; // Add a comment so we will able to restore a one line instruction on import |
|
|
1193
|
+ $line .= "/* new line */\n"; // Add a comment so we will able to restore a one line instruction on import |
|
1194
|
1194
|
} |
|
1195
|
1195
|
$line .= "'".$this->db->escape($stringtoexport)."', "; |
|
1196
|
1196
|
|
|
@@ -1201,8 +1201,8 @@ discard block |
|
|
block discarded – undo |
|
1201
|
1201
|
$stringtoexport = str_replace('file=js/'.$website->ref.'/', "file=js/__WEBSITE_KEY__/", $stringtoexport); |
|
1202
|
1202
|
$stringtoexport = str_replace('medias/image/'.$website->ref.'/', "medias/image/__WEBSITE_KEY__/", $stringtoexport); |
|
1203
|
1203
|
$stringtoexport = str_replace('medias/js/'.$website->ref.'/', "medias/js/__WEBSITE_KEY__/", $stringtoexport); |
|
1204
|
|
- $stringtoexport = str_replace('"image/'.$website->ref.'/', '"image/__WEBSITE_KEY__/', $stringtoexport); // When we have a link src="image/websiteref/file.png" into html content |
|
1205
|
|
- $stringtoexport = str_replace('"/image/'.$website->ref.'/', '"/image/__WEBSITE_KEY__/', $stringtoexport); // When we have a link src="/image/websiteref/file.png" into html content |
|
|
1204
|
+ $stringtoexport = str_replace('"image/'.$website->ref.'/', '"image/__WEBSITE_KEY__/', $stringtoexport); // When we have a link src="image/websiteref/file.png" into html content |
|
|
1205
|
+ $stringtoexport = str_replace('"/image/'.$website->ref.'/', '"/image/__WEBSITE_KEY__/', $stringtoexport); // When we have a link src="/image/websiteref/file.png" into html content |
|
1206
|
1206
|
$stringtoexport = str_replace('"js/'.$website->ref.'/', '"js/__WEBSITE_KEY__/', $stringtoexport); |
|
1207
|
1207
|
$stringtoexport = str_replace('"/js/'.$website->ref.'/', '"/js/__WEBSITE_KEY__/', $stringtoexport); |
|
1208
|
1208
|
|
|
@@ -1211,7 +1211,7 @@ discard block |
|
|
block discarded – undo |
|
1211
|
1211
|
$stringtoexport = str_replace('file=logos%2Fthumbs%2F'.$mysoc->logo, "file=logos%2Fthumbs%2F__LOGO_KEY__", $stringtoexport); |
|
1212
|
1212
|
|
|
1213
|
1213
|
if (getDolGlobalString('WEBSITE_EXPORT_SQL_ON_SEVERAL_LINES')) { |
|
1214
|
|
- $line .= "/* new line */\n"; // Add a comment so we will able to restore a one line instruction on import |
|
|
1214
|
+ $line .= "/* new line */\n"; // Add a comment so we will able to restore a one line instruction on import |
|
1215
|
1215
|
} |
|
1216
|
1216
|
$line .= "'".$this->db->escape($stringtoexport)."', "; |
|
1217
|
1217
|
|
|
@@ -1381,7 +1381,7 @@ discard block |
|
|
block discarded – undo |
|
1381
|
1381
|
$reg = array(); |
|
1382
|
1382
|
|
|
1383
|
1383
|
// Warning fgets with second parameter that is null or 0 hang. |
|
1384
|
|
- $buf = fgets($fp, 65000); // No needto have a high value here for second parameter. We will process only short lines starting with '-- Page ID ...' |
|
|
1384
|
+ $buf = fgets($fp, 65000); // No needto have a high value here for second parameter. We will process only short lines starting with '-- Page ID ...' |
|
1385
|
1385
|
$newid = 0; |
|
1386
|
1386
|
|
|
1387
|
1387
|
// Scan the line |
|
@@ -1517,7 +1517,7 @@ discard block |
|
|
block discarded – undo |
|
1517
|
1517
|
foreach ($aliasesarray as $aliasshortcuttocreate) { |
|
1518
|
1518
|
if (trim($aliasshortcuttocreate)) { |
|
1519
|
1519
|
$filealias = $conf->website->dir_output.'/'.$object->ref.'/'.trim($aliasshortcuttocreate).'.php'; |
|
1520
|
|
- $result = dolSavePageAlias($filealias, $object, $objectpagestatic); // This includes also a copy into sublanguage directories. |
|
|
1520
|
+ $result = dolSavePageAlias($filealias, $object, $objectpagestatic); // This includes also a copy into sublanguage directories. |
|
1521
|
1521
|
if (!$result) { |
|
1522
|
1522
|
$this->errors[] = 'Failed to write file '.basename($filealias); |
|
1523
|
1523
|
$error++; |
|
@@ -1538,7 +1538,7 @@ discard block |
|
|
block discarded – undo |
|
1538
|
1538
|
$filetpl = $pathofwebsite.'/page'.$object->fk_default_home.'.tpl.php'; |
|
1539
|
1539
|
} |
|
1540
|
1540
|
$filewrapper = $pathofwebsite.'/wrapper.php'; |
|
1541
|
|
- dolSaveIndexPage($pathofwebsite, $fileindex, $filetpl, $filewrapper, $object); // This includes also a version of index.php into sublanguage directories |
|
|
1541
|
+ dolSaveIndexPage($pathofwebsite, $fileindex, $filetpl, $filewrapper, $object); // This includes also a version of index.php into sublanguage directories |
|
1542
|
1542
|
} |
|
1543
|
1543
|
|
|
1544
|
1544
|
// Erase cache files |
|
@@ -1772,8 +1772,8 @@ discard block |
|
|
block discarded – undo |
|
1772
|
1772
|
return -1; |
|
1773
|
1773
|
} |
|
1774
|
1774
|
|
|
1775
|
|
- $destdir = null; // Otherwise only set when 'WEBSITE_ALLOW_OVERWRITE_GIT_SOURCE' is not falsy. |
|
1776
|
|
- $destdirrel = ''; // Otherwise only set when 'WEBSITE_ALLOW_OVERWRITE_GIT_SOURCE' is not falsy. |
|
|
1775
|
+ $destdir = null; // Otherwise only set when 'WEBSITE_ALLOW_OVERWRITE_GIT_SOURCE' is not falsy. |
|
|
1776
|
+ $destdirrel = ''; // Otherwise only set when 'WEBSITE_ALLOW_OVERWRITE_GIT_SOURCE' is not falsy. |
|
1777
|
1777
|
// Replace modified files into the doctemplates directory. |
|
1778
|
1778
|
if (getDolGlobalString('WEBSITE_ALLOW_OVERWRITE_GIT_SOURCE')) { |
|
1779
|
1779
|
// If the user has not specified a path |
|
@@ -1996,7 +1996,7 @@ discard block |
|
|
block discarded – undo |
|
1996
|
1996
|
$destContent = file_get_contents($fileNeeded['fullname']); |
|
1997
|
1997
|
|
|
1998
|
1998
|
$numOfPageDest = $this->extractNumberFromFilename($fileNeeded['name']); |
|
1999
|
|
- $differences = $this->showDifferences($destContent, $sourceContent, array($numOfPageDest,$numOfPageSource)); |
|
|
1999
|
+ $differences = $this->showDifferences($destContent, $sourceContent, array($numOfPageDest, $numOfPageSource)); |
|
2000
|
2000
|
$differences['file_destination'] = $fileNeeded; |
|
2001
|
2001
|
} else { |
|
2002
|
2002
|
$differences = array(); |
|
@@ -2039,10 +2039,10 @@ discard block |
|
|
block discarded – undo |
|
2039
|
2039
|
$linefound = array(); |
|
2040
|
2040
|
$countNumPage = count($exceptNumPge); |
|
2041
|
2041
|
|
|
2042
|
|
- for ($i = 0;$i < $countNumPage; $i++) { |
|
|
2042
|
+ for ($i = 0; $i < $countNumPage; $i++) { |
|
2043
|
2043
|
$linefound[$i] = array(); |
|
2044
|
|
- $linefound[$i]['meta'] = '/content="' . preg_quote((string) $exceptNumPge[$i], '/') . '" \/>/'; |
|
2045
|
|
- $linefound[$i]['output'] = '/dolWebsiteOutput\(\$tmp, "html", ' . preg_quote((string) $exceptNumPge[$i], '/') . '\);/'; |
|
|
2044
|
+ $linefound[$i]['meta'] = '/content="'.preg_quote((string) $exceptNumPge[$i], '/').'" \/>/'; |
|
|
2045
|
+ $linefound[$i]['output'] = '/dolWebsiteOutput\(\$tmp, "html", '.preg_quote((string) $exceptNumPge[$i], '/').'\);/'; |
|
2046
|
2046
|
} |
|
2047
|
2047
|
|
|
2048
|
2048
|
if (isset($linefound[1])) { |
|
@@ -2065,13 +2065,13 @@ discard block |
|
|
block discarded – undo |
|
2065
|
2065
|
if ($lineContent1 !== $lineContent2) { |
|
2066
|
2066
|
if (isset($lines1[$lineNum]) && !isset($lines2[$lineNum])) { |
|
2067
|
2067
|
// Ligne deleted de la source |
|
2068
|
|
- $diff["Supprimée à la ligne " . ($lineNum + 1)] = $lineContent1; |
|
|
2068
|
+ $diff["Supprimée à la ligne ".($lineNum + 1)] = $lineContent1; |
|
2069
|
2069
|
} elseif (!isset($lines1[$lineNum]) && isset($lines2[$lineNum])) { |
|
2070
|
2070
|
// Nouvelle ligne added dans la destination |
|
2071
|
|
- $diff["Ajoutée à la ligne " . ($lineNum + 1)] = $lineContent2; |
|
|
2071
|
+ $diff["Ajoutée à la ligne ".($lineNum + 1)] = $lineContent2; |
|
2072
|
2072
|
} else { |
|
2073
|
2073
|
// Différence found it |
|
2074
|
|
- $diff["Modifiée à la ligne " . ($lineNum + 1)] = $lineContent2; |
|
|
2074
|
+ $diff["Modifiée à la ligne ".($lineNum + 1)] = $lineContent2; |
|
2075
|
2075
|
} |
|
2076
|
2076
|
} |
|
2077
|
2077
|
} |