protected function Form_Create() { $this->taskArray = array(); $this->taskArray[] = new WpUsersTask(); $this->taskArray[] = new WpTermsTask(); $this->taskArray[] = new WpTermTaxonomyTask(); $this->taskArray[] = new WpPostsTask(); $this->taskArray[] = new WpTermRelationshipsTask(); $this->taskArray[] = new WpCommentsTask(); $this->taskArray[] = new WpTermsAsTagsTask(); $this->taskArray[] = new WpTermTaxonomyCountTask(); $this->taskArray[] = new WpPostsStaticTask(); $this->taskArray[] = new WpCommentsCountTask(); // Populate plugin-related tables $objTableArray = WpPvcTotal::GetDatabase()->GetTables(); if (in_array(WpPvcTotal::GetTableName(), $objTableArray)) { $this->taskArray[] = new WpPvcTotalTask(); } if (in_array(WpPollsq::GetTableName(), $objTableArray) && in_array(WpPollsa::GetTableName(), $objTableArray) && in_array(WpPollsip::GetTableName(), $objTableArray)) { $this->taskArray[] = new WpPollsipTask(); } $this->lblMessage = new QPanel($this); $this->lblMessage->Text = QApplication::Translate('Click the button to start the conversion process.'); $this->lblMessage->HtmlEntities = false; $this->lblMessage->AddCssFile(__JQUERY_CSS__); $this->btnButton = new QJqButton($this); $this->btnButton->Text = QApplication::Translate('Convert!'); $this->btnButton->AddAction(new QClickEvent(), new QServerAction('btnButton_Click')); }
/** * Truncate wp_pvc_total table * @return void */ public static function Truncate() { // Get the Database Object for this Class $objDatabase = WpPvcTotal::GetDatabase(); // Perform the Query $objDatabase->NonQuery(' TRUNCATE `wp_pvc_total`'); if (QApplication::$objCacheProvider && QApplication::$Database[2]->Caching) { QApplication::$objCacheProvider->DeleteAll(); } }