Beispiel #1
0
 $UserSettings->dbupdate();
 $success = param_check_not_empty('svn_url', T_('Please enter the URL of repository'));
 $success = $success && param_check_regexp('svn_folder', '#/blogs/$#', T_('A correct SVN folder path must ends with "/blogs/'));
 if (!$success) {
     $action = 'start';
     break;
 }
 $success = prepare_maintenance_dir($upgrade_path, true);
 if ($success) {
     // Set maximum execution time
     set_max_execution_time(2400);
     // 60 minutes
     load_class('_ext/phpsvnclient/phpsvnclient.php', 'phpsvnclient');
     $phpsvnclient = new phpsvnclient($svn_url, $svn_user, $svn_password);
     // Get an error if it was during connecting to svn server
     $svn_error = $phpsvnclient->getError();
     if (!empty($svn_error) || $phpsvnclient->getVersion() < 1) {
         // Some errors or Incorrect version
         echo '<p class="red">' . T_('Unable to get a repository version, probably URL of repository is incorrect.') . '</p>';
         evo_flush();
         $action = 'start';
         break;
         // Stop an upgrade from SVN
     }
     if ($svn_revision > 0) {
         // Set revision from request
         if ($phpsvnclient->getVersion() < $svn_revision) {
             // Incorrect revision number
             echo '<p class="red">' . sprintf(T_('Please select a correct revision number. The latest revision is %s.'), $phpsvnclient->getVersion()) . '</p>';
             evo_flush();
             $action = 'start';