BUG PM-393 muetsra un Notice al inicio cuando se realiza restore a la version PM 2.8 SOLVED

This commit is contained in:
Julio Cesar Laura
2014-10-03 10:31:50 -04:00
parent ffc598a918
commit 2015aea438

View File

@@ -1262,6 +1262,7 @@ class workspaceTools
$lines = explode("\n", $script);
$previous = null;
$insert = false;
foreach ($lines as $j => $line) {
// Remove comments from the script
$line = trim($line);
@@ -1286,6 +1287,7 @@ class workspaceTools
$line = substr($line, 0, strrpos($line, ";"));
if (strrpos($line, "INSERT INTO") !== false) {
$insert = true;
if ($insert) {
$result = mysql_query("START TRANSACTION");
$insert = false;
@@ -1355,7 +1357,7 @@ class workspaceTools
$chmod = @chmod($filename, $perms);
if ($chgrp === false || $chmod === false || $chown === false) {
if (strtoupper( substr( PHP_OS, 0, 3 ) ) === 'WIN') {
exec( 'icacls ' . $dirNameWin . '/grant Administrador:(D,WDAC) /T', $res );
exec( 'icacls ' . $filename . '/grant Administrador:(D,WDAC) /T', $res );
} else {
CLI::logging(CLI::error("Failed to set permissions for $filename") . "\n");
}