Exemple #1
0
<?php

/// Copyright (c) 2004-2015, Needlworks  / Tatter Network Foundation
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
$IV = array('POST' => array('confirmativePassword' => array('string', 'mandatory' => false), 'removeAttachments' => array(array('0', '1'), 'dafault' => null)));
require ROOT . '/library/preprocessor.php';
requireStrictRoute();
if (empty($_POST['confirmativePassword']) || !User::confirmPassword(User::getBlogOwner(getBlogId()), $_POST['confirmativePassword'])) {
    Respond::ResultPage(1);
}
DataMaintenance::removeAll(Validator::getBool(@$_POST['removeAttachments']));
CacheControl::flushAll();
Respond::ResultPage(0);
Exemple #2
0
setProgress(0, _t('백업파일을 확인하고 있습니다.'));
$xmls->setStream('/blog/setting/banner/content');
$xmls->setStream('/blog/post/attachment/content');
$xmls->setStream('/blog/notice/attachment/content');
$xmls->setStream('/blog/keyword/attachment/content');
$xmls->setConsumer('scanner');
if (!$xmls->openFile($backup, Validator::getBool(@$_POST['correctData']))) {
    finish(_f('백업파일의 %1번째 줄이 올바르지 않습니다.', $xmls->error['line']));
}
$xmls->close();
if ($items == 0) {
    finish(_t('백업파일에 복원할 데이터가 없습니다.'));
}
if (!$migrational) {
    setProgress(0, _t('복원 위치를 준비하고 있습니다.'));
    DataMaintenance::removeAll(false);
    CacheControl::flushAll();
}
$xmls->setConsumer('importer');
if (!$xmls->openFile($backup, Validator::getBool(@$_POST['correctData']))) {
    finish(_t('백업파일이 올바르지 않습니다.'));
}
$xmls->close();
if (file_exists(__TEXTCUBE_CACHE_DIR__ . "/import/{$blogid}.xml")) {
    @unlink(__TEXTCUBE_CACHE_DIR__ . "/import/{$blogid}.xml");
}
setProgress(100, _t('완료되었습니다.'));
finish();
/*@callback@*/
function scanner($path, $node, $line)
{