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