$sql_ary[] = array('contrib_id' => $row['contrib_id'], 'revision_id' => $row['revision_id'], 'phpbb_version_branch' => $data[0], 'phpbb_version_revision' => get_real_revision_version($data[1]), 'revision_validated' => $row['revision_validated']); } } phpbb::$db->sql_freeresult($result); phpbb::$db->sql_multi_insert(TITANIA_REVISIONS_PHPBB_TABLE, $sql_ary); $display_message = 'Smilies, Avatars, Ranks, Styles Misc support the latest phpBB'; break; case 7: $sync = new titania_sync(); $sync->authors('count'); $display_message = 'Authors'; break; case 8: $sync = new titania_sync(); $sync->contribs('validated'); $sync->categories('count'); $display_message = 'Syncing'; break; case 9: phpbb::$cache->purge(); trigger_error('Ariel Conversion Finished!'); break; } if ($start + $limit >= $total) { // Move to the next step $next = append_sid(TITANIA_ROOT . 'ariel_convert.' . PHP_EXT, 'step=' . ++$step); $display_message .= '...done!'; } else { // Still more to do $next = append_sid(TITANIA_ROOT . 'ariel_convert.' . PHP_EXT, "step={$step}&start=" . ($start + $limit)); $display_message .= '...done with ' . ($start + $limit) . ' of ' . $total;
/** * Remove complete category */ public function delete($sync = true) { // This should be the correct diff value each time $diff = 2; // Resync tree $sql = 'UPDATE ' . $this->sql_table . "\n\t\t\tSET right_id = right_id - {$diff}\n\t\t\tWHERE left_id < {$this->right_id} AND right_id > {$this->right_id}"; phpbb::$db->sql_query($sql); $sql = 'UPDATE ' . $this->sql_table . "\n\t\t\tSET left_id = left_id - {$diff}, right_id = right_id - {$diff}\n\t\t\tWHERE left_id > {$this->right_id}"; phpbb::$db->sql_query($sql); // Delete content $sql = 'DELETE FROM ' . TITANIA_CONTRIB_IN_CATEGORIES_TABLE . ' WHERE category_id = ' . $this->category_id; phpbb::$db->sql_query($sql); // Delete self parent::delete(); // Resync counters if ($sync) { $sync = new titania_sync(); $sync->categories('count'); } // Destroy category cache $this->destroy_cache(); }