Changeset 1180510
- Timestamp:
- 06/14/2015 04:38:02 AM (11 years ago)
- Location:
- the-welcomizer/trunk
- Files:
-
- 4 edited
-
includes/twiz.class.php (modified) (1 diff)
-
includes/twiz.installation.class.php (modified) (5 diffs)
-
includes/twiz.menu.class.php (modified) (2 diffs)
-
twiz-index.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
the-welcomizer/trunk/includes/twiz.class.php
r1180470 r1180510 37 37 public $override_network_settings; 38 38 public $privacy_question_answered; 39 p rotected$table;39 public $table; 40 40 protected $nonce; 41 41 protected $version; -
the-welcomizer/trunk/includes/twiz.installation.class.php
r1180484 r1180510 134 134 $current_table = $wpdb->get_var( "show tables like '".$this->table."'" ); 135 135 136 if( is_multisite() ){ // Rename the table if installed on multisite event if it was not supported before v.8, who knows.137 138 $old_table_version = $wpdb->get_var( "show tables like '".$wpdb->prefix .'the_welcomizer'."'" );139 140 if( $old_table_version == $wpdb->prefix .'the_welcomizer' ){ // rename the table.141 142 $altersql = "RENAME TABLE ".$old_table_version. " TO ". $this->table . "";143 $code = $wpdb->query($altersql);144 145 $current_table = $this->table;146 }147 }148 136 149 137 if ( $current_table != $this->table ){ // new install … … 157 145 158 146 $ok = $this->setConfigurationSettings( $network_activation, false ); 159 147 160 148 }else{ // UPDATE TO NEW VERSION, or install new separatly 161 149 … … 167 155 $twiz_network_activated = get_option('twiz_network_activated'); 168 156 if($twiz_privacy_question_answered == ''){ $code = update_option('twiz_privacy_question_answered', false); } 157 169 158 if($is_overriding_network_settings == ''){ 170 159 … … 734 723 if( !isset($this->admin_option[parent::KEY_DELETE_ALL] ) ) { $this->admin_option[parent::KEY_DELETE_ALL] = ''; } 735 724 if( !isset($admin_option[parent::KEY_DELETE_ALL] ) ) { $admin_option[parent::KEY_DELETE_ALL] = ''; } 725 736 726 if( $this->admin_option[parent::KEY_DELETE_ALL] == '' ) { $this->admin_option[parent::KEY_DELETE_ALL] = '1'; } 737 727 if( $admin_option[parent::KEY_DELETE_ALL] == '' ) { $admin_option[parent::KEY_DELETE_ALL] = '1'; } … … 789 779 $reset_stored_request = $wpdb->get_var( "show tables like '".$this->table."'" ); 790 780 } 791 781 782 if( !isset($this->admin_option[parent::KEY_REMOVE_CREATED_DIRECTORIES] ) ) { $this->admin_option[parent::KEY_REMOVE_CREATED_DIRECTORIES] = ''; } 783 if( $this->admin_option[parent::KEY_REMOVE_CREATED_DIRECTORIES] == '' ) { $this->admin_option[parent::KEY_REMOVE_CREATED_DIRECTORIES] = '1'; } 792 784 // remove directories 793 785 if( $this->admin_option[parent::KEY_REMOVE_CREATED_DIRECTORIES] == '1' ){ -
the-welcomizer/trunk/includes/twiz.menu.class.php
r1180484 r1180510 79 79 80 80 function getVarDump( $twiz_action = '' ){ 81 81 global $wpdb; 82 82 $output = ''; 83 83 … … 108 108 109 109 $output .= '<br><span class="twiz-bold twiz-blue">$this->version</span> = <span class="">'.$this->version.'</span>'; 110 $output .= '<br><span class="twiz-bold twiz-blue">$this->version</span> = <span class="">'.$wpdb->base_prefix.'</span>'; 111 $output .= '<br><span class="twiz-bold twiz-blue">$this->version</span> = <span class="">'.$wpdb->prefix.'</span>'; 110 112 $output .= '<br><span class="twiz-bold twiz-blue">$this->cssVersion</span> = <span class="">'.$this->cssVersion.'</span>'; 111 113 $output .= '<br><span class="twiz-bold twiz-blue">$this->dbVersion</span> = <span class="">'.$this->dbVersion.'</span>'; -
the-welcomizer/trunk/twiz-index.php
r1180484 r1180510 77 77 if(!function_exists('twizInstall')){ 78 78 function twizInstall( $network_activation = ''){ 79 79 80 global $wpdb; 81 80 82 if( is_multisite() ){ // v3.2 version supported (no params $network_activation) 81 83 … … 100 102 switch_to_blog($blog['id']); 101 103 $code = update_option('twiz_network_activated', '1'); // Switch On the networkfeature for all 104 $ok = $TwizInstallation->install( $network_activation ); 102 105 $result = activate_plugin('the-welcomizer/twiz-index.php'); 103 106 restore_current_blog(); 104 107 } 105 108 106 $ok = $TwizInstallation->install( $network_activation );107 108 109 }else{ 109 110 if ( ! function_exists( 'is_plugin_active_for_network' ) ){ require_once( ABSPATH . '/wp-admin/includes/plugin.php' ); } 111 112 // On network activation, twizInstall is called a first time with no params. 113 if ( ( !is_multisite() ) or( is_plugin_active_for_network( 'the-welcomizer/twiz-index.php' ) ) ) { 114 115 $TwizInstallation = new TwizInstallation(); 116 $ok = $TwizInstallation->install( $network_activation ); 117 } 118 110 111 $TwizInstallation = new TwizInstallation(); 112 $ok = $TwizInstallation->install( $network_activation ); 119 113 } 120 114
Note: See TracChangeset
for help on using the changeset viewer.