コード例 #1
0
ファイル: phpsvnclient.php プロジェクト: pachakamaq/kuva
<?php

$dir = dirname(__FILE__);
require $_SERVER['DOCUMENT_ROOT'] . '/phpsvnclient/phpsvnclient.php';
$sources = array();
$dom = extractElements($dir . '/config.xml', $sources);
foreach ($sources['SOURCE'] as $source) {
    $user = $source->hasAttribute('user') ? $source->getAttribute('user') : NULL;
    $pass = $source->hasAttribute('pass') ? $source->getAttribute('pass') : NULL;
    $phpsvnclient = new phpsvnclient($source->getAttribute('url'), $user, $password);
    for ($i = 0; $i < $source->childNodes->length; ++$i) {
        if ($source->childNodes->item($i)->nodeType == 1) {
            $dir = $source->childNodes->item($i);
            $phpsvnclient->checkOut($dir->getAttribute('remote'), $dir->getAttribute('local'));
        }
    }
}
コード例 #2
0
ファイル: upgrade.ctrl.php プロジェクト: ldanielz/uesp.blog
             $phpsvnclient->setVersion($svn_revision);
         }
     }
     $repository_version = $phpsvnclient->getVersion();
     $upgrade_name = 'export_svn_' . $repository_version;
     memorize_param('upd_name', 'string', '', $upgrade_name);
     $upgrade_folder = $upgrade_path . $upgrade_name;
     if (file_exists($upgrade_path . $upgrade_name)) {
         // Current version already is downloaded
         echo '<p class="green">' . sprintf(T_('Revision %s has already been downloaded. Using: %s'), $repository_version, $upgrade_path . $upgrade_name);
     } else {
         // Download files
         echo '<p>' . sprintf(T_('Downloading package to &laquo;<strong>%s</strong>&raquo;...'), $upgrade_folder);
         evo_flush();
         // Export all files in temp folder for following coping
         $svn_result = $phpsvnclient->checkOut($svn_folder, $upgrade_folder, false, true);
         echo '</p>';
         if ($svn_result === false) {
             // Checkout is failed
             echo '<p style="color:red">' . sprintf(T_('Unable to download package from &laquo;%s&raquo;'), $svn_url) . '</p>';
             evo_flush();
             $action = 'start';
             break;
         }
     }
 }
 if ($success) {
     // Pause a process before upgrading
     $action = 'backup_and_overwrite_svn';
     $AdminUI->disp_view('maintenance/views/_upgrade_continue.form.php');
     unset($block_item_Widget);