Fix workspace restore from 2.5.2 to 2.9/3.0

This commit is contained in:
Julio Cesar Laura
2015-05-10 17:16:34 -04:00
parent 5c82af6582
commit e2e45a38a4
6 changed files with 30 additions and 12 deletions

View File

@@ -1608,12 +1608,14 @@ class workspaceTools
$final = $stop - $start;
CLI::logging("<*> Verify took $final seconds.\n");
/*$start = microtime(true);
$workspace->checkMafeRequirements($workspaceName, $lang);
$start = microtime(true);
CLI::logging("> Updating cache view...\n");
$workspace->upgradeCacheView(true, false, $lang);
$stop = microtime(true);
$final = $stop - $start;
CLI::logging("<*> Updating cache view Process took $final seconds.\n");*/
CLI::logging("<*> Updating cache view Process took $final seconds.\n");
mysql_close($link);
}
@@ -1695,6 +1697,13 @@ class workspaceTools
$this->initPropel(true);
$pmRestClient = OauthClientsPeer::retrieveByPK('x-pm-local-client');
if (empty($pmRestClient)) {
if (!is_file(PATH_DATA . 'sites/' . $workspace . '/' . '.server_info')) {
$_CSERVER = $_SERVER;
unset($_CSERVER['REQUEST_TIME']);
unset($_CSERVER['REMOTE_PORT']);
$cput = serialize($_CSERVER);
file_put_contents(PATH_DATA . 'sites/' . $workspace . '/' . '.server_info', $cput);
}
if (is_file(PATH_DATA . 'sites/' . $workspace . '/' . '.server_info')) {
$SERVER_INFO = file_get_contents(PATH_DATA . 'sites/' . $workspace . '/'.'.server_info');
$SERVER_INFO = unserialize($SERVER_INFO);