Exemple #1
0
function clearall()
{
    clearposts();
    cleartags(tcategories::i());
    cleartags(ttags::i());
    clearmenu();
    if (dbversion) {
        $do = tdboptimizer::i();
        $do->optimize();
    }
}
Exemple #2
0
        foreach ($data->data['items'] as $id => $item) {
            $widget->add($item['title'], $item['content'], 'widget');
        }
        $widget->unlock();
        $widgets->unlock();
    }
}
echo "<pre>\n";
tmigratedata::$dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . litepublisher::$domain . DIRECTORY_SEPARATOR;
$data = new tmigratedata();
$linkgen = tlinkgenerator::instance();
$linkgen->archive = '/[year]/[month]/';
$linkgen->save();
clearposts();
cleartags(tcategories::instance());
cleartags(ttags::instance());
clearmenu();
if (dbversion && litepublisher::$options->version == 4.65) {
    $man = tdbmanager::instance();
    $man->alter('comusers', "modify `name` text NOT NULL");
    $man->alter('pingbacks', "modify `title` text NOT NULL");
    litepublisher::$options->version = 4.66;
}
$do = tdboptimizer::instance();
$do->optimize();
migrateoptions();
migrateposts();
migratetags(tcategories::instance());
migratetags(ttags::instance());
migratemenus();
//migratewidgets();