dir_clear($tmpdir);
     cloudaddons_faillog($_GET['rid'], 104);
     cpmsg('cloudaddons_download_error', '', 'error', array('ErrorCode' => 104));
 }
 if ($_GET['type'] != 'pack') {
     $descdir = DISCUZ_ROOT . $typedir[$_GET['type']] . '/';
     $subdir = $_GET['key'];
 } else {
     $descdir = DISCUZ_ROOT;
     $subdir = '';
 }
 $unwriteabledirs = cloudaddons_dirwriteable($descdir, $subdir, $tmpdir);
 if ($unwriteabledirs) {
     if (!submitcheck('settingsubmit')) {
         showtips(cplang('cloudaddons_unwriteabledirs', array('basedir' => $typedir[$_GET['type']] != '.' ? $typedir[$_GET['type']] : '/', 'unwriteabledirs' => implode(', ', $unwriteabledirs))));
         siteftp_form("cloudaddons&operation=download&addonids={$_GET['addonids']}&i={$addoni}&end=" . rawurlencode($_GET['end']) . "&step=2&md5hash=" . $_GET['md5hash'] . '&timestamp=' . $_GET['timestamp']);
         exit;
     } else {
         siteftp_check($_GET['siteftp'], $typedir[$_GET['type']]);
     }
 }
 $descdir .= $subdir;
 cloudaddons_comparetree($tmpdir, $descdir, $tmpdir, $_GET['key'] . '.' . $_GET['type'], 1);
 if (!empty($_G['treeop']['oldchange']) && empty($_GET['confirmed'])) {
     cpmsg('cloudaddons_install_files_changed', '', 'form', array('files' => implode('<br />', $_G['treeop']['oldchange'])));
 }
 cloudaddons_copytree($tmpdir, $descdir);
 cloudaddons_savemd5($_GET['key'] . '.' . $_GET['type'], $_GET['end'], $_G['treeop']['md5']);
 cloudaddons_deltree($tmpdir);
 if (count($addonids) - 1 > $addoni) {
     $addoni++;
Exemple #2
0
     showsubmit('fixpatchsubmit', 'founder_patch_fix', 'select_all', ' <input type="button" class="btn" onclick="window.location.href=\'' . ADMINSCRIPT . '?action=patch&operation=recheckpatch' . '\';" value="' . $lang['founder_patch_rescan'] . '">');
     showtablefooter();
     showformfooter();
 } else {
     $patchlist = $_GET['deletefix'];
     if (empty($patchlist)) {
         cpmsg('patch_please_select_patch', '', 'error');
     }
     $confirm = $_GET['confirm'];
     if (!$confirm) {
         if ($_GET['siteftpsetting']) {
             $action = 'patch&operation=fixpatch&fixpatchsubmit=yes&confirm=ftp';
             foreach ($patchlist as $serial) {
                 $action .= '&deletefix[]=' . $serial;
             }
             siteftp_form($action);
             exit;
         }
         $flag = 0;
         foreach (C::t('common_patch')->fetch_needfix_patch($patchlist) as $patch) {
             if (!$discuz_patch->test_patch_writable($patch)) {
                 $flag = 1;
                 break;
             }
         }
         if (!$flag) {
             $confirm = 'file';
         } else {
             $linkurl = ADMINSCRIPT . '?action=patch&operation=' . $operation . '&fixpatchsubmit=yes';
             foreach ($patchlist as $serial) {
                 $linkurl .= '&deletefix[]=' . $serial;