Exemple #1
0
    $objMessage->Message = trim($strContent);
    $objMessage->RefreshCompiledHtml();
    $objMessage->Save();
    if ($objMessage->Id != $objRow['id']) {
        Message::GetDatabase()->NonQuery('UPDATE message SET id=' . $objRow['id'] . ' WHERE id=' . $objMessage->Id);
        Message::GetDatabase()->NonQuery('ALTER TABLE message AUTO_INCREMENT=' . ($objMessage->Id + 1));
    }
}
$objResult = $objDb->query('SELECT * FROM counter ORDER BY id');
while (QDataGen::DisplayWhileTask('Migrating Counters', $objResult->num_rows)) {
    $objRow = $objResult->fetch_array();
    $objCounter = new Counter();
    $objCounter->Filename = $objRow['filename'];
    $objCounter->Token = $objRow['token'];
    $objCounter->Counter = $objRow['counter'];
    $objCounter->Save();
    if ($objCounter->Id != $objRow['id']) {
        Counter::GetDatabase()->NonQuery('UPDATE Counter SET id=' . $objRow['id'] . ' WHERE id=' . $objCounter->Id);
    }
}
$objResult = $objDb->query('SELECT * FROM article ORDER BY id');
while (QDataGen::DisplayWhileTask('Migrating Articles', $objResult->num_rows)) {
    $objRow = $objResult->fetch_array();
    switch ($objRow['article_section_id']) {
        case 1:
            $strPath = '/article/getting_started/';
            break;
        case 2:
            $strPath = '/article/harnessing/';
            break;
        case 3: