コード例 #1
0
 /**
  * Create database tables. 
  *
  * @return 	void
  * @access 	private
  * @since 	1.0.0
  */
 private function create_tables()
 {
     require_once 'db/abstract-class-charitable-db.php';
     require_once 'db/class-charitable-campaign-donations-db.php';
     $table_helper = new Charitable_Campaign_Donations_DB();
     $table_helper->create_table();
     require_once 'db/class-charitable-donors-db.php';
     $table_helper = new Charitable_Donors_DB();
     $table_helper->create_table();
 }
コード例 #2
0
 /**
  * Update the upgrade system.
  *
  * Also updates the campaign donations table to start storing amounts as DECIMAL, instead of FLOAT.
  *
  * This upgrade routine was added in 1.3.0.
  *
  * @see 	https://github.com/Charitable/Charitable/issues/56
  *
  * @return  void
  * @access  public
  * @since   1.3.0
  */
 public function update_upgrade_system()
 {
     if (!current_user_can('manage_charitable_settings')) {
         wp_die(__('You do not have permission to do Charitable upgrades', 'charitable'), __('Error', 'charitable'), array('response' => 403));
     }
     ignore_user_abort(true);
     if (!charitable_is_func_disabled('set_time_limit') && !ini_get('safe_mode')) {
         @set_time_limit(0);
     }
     /**
      * Update the campaign donations table to use DECIMAL for amounts.
      *
      * @see 	https://github.com/Charitable/Charitable/issues/56
      */
     $table = new Charitable_Campaign_Donations_DB();
     $table->create_table();
     $this->upgrade_logs();
     $this->finish_upgrade('update_upgrade_system');
 }