Plugin Directory

Changeset 1180470


Ignore:
Timestamp:
06/13/2015 11:28:08 PM (11 years ago)
Author:
sebwordpress
Message:

Updated trunk - fixed activation bug

Location:
the-welcomizer/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • the-welcomizer/trunk/includes/twiz.admin.class.php

    r1179719 r1180470  
    744744       
    745745            $this->override_network_settings = '0';
    746            
    747             if( ( !is_multisite() ) or ( $this->override_network_settings == '1' ) ){
    748            
    749                 $code = update_option('twiz_override_network_settings', $this->override_network_settings);
    750                 $this->override_network_settings = get_option('twiz_override_network_settings');
    751                
    752             }else{
    753            
    754                 $this->override_network_settings = '0';
    755             }
     746            $code = update_option('twiz_override_network_settings', $this->override_network_settings);
    756747        }
    757748       
  • the-welcomizer/trunk/includes/twiz.class.php

    r1180097 r1180470  
    938938       
    939939        $this->override_network_settings = get_option('twiz_override_network_settings'); //  Main switch between get_option and get_site_option
     940
     941        if( $this->override_network_settings == '' ) {
     942       
     943            $this->override_network_settings = '0';
     944        }
     945       
    940946        $ok = $this->setDefaultSectionArrayValues();
    941        
     947
    942948        if( ( $this->user_id == '' ) or ($this->user_id == '0' ) ){ // for the front-end or installation only
    943949
     
    11691175        $jquery = '<script>
    11701176//<![CDATA[
    1171 jQuery(document).ready(function($) {
     1177jQuery(document).ready(function($) {';
     1178
     1179
     1180        if( ( $this->admin_option[self::KEY_DISPLAY_VAR_DUMP] == true ) or ( TWIZ_FORCE_VARDUMP ==  true ) ){
     1181       
     1182         $jquery .= '
     1183         $("#twiz_var_dump").css({"display":"block","height":$(window).height()-65, "width":$(window).width()-720});';
     1184         
     1185        }
     1186        $jquery .= '
    11721187        $.ajaxSetup({ cache: false });
    11731188        $("#twiz_privacy_save").click(function(){
     
    11901205</script>';
    11911206
     1207        if( ( $this->admin_option[self::KEY_DISPLAY_VAR_DUMP] == true ) or ( TWIZ_FORCE_VARDUMP ==  true ) ){
     1208       
     1209            $myTwizMenu = new TwizMenu();
     1210            $html .= '<div id="twiz_var_dump" title="'.__('Click to Refresh', 'the-welcomizer').'">'.$myTwizMenu->getVarDump().'</div>';
     1211        }
    11921212        return $html.$jquery;
    11931213    }
     
    40064026                   
    40074027                        $code = update_option('twiz_override_network_settings',  '1');
    4008                         
     4028 
    40094029                    }else{
    40104030                   
  • the-welcomizer/trunk/includes/twiz.installation.class.php

    r1179719 r1180470  
    159159     
    160160        }else{ // UPDATE TO NEW VERSION, or install new separatly
    161                
     161       
    162162            $is_overriding_network_settings = get_option('twiz_override_network_settings');
    163163
    164164            if( ( is_multisite() ) and ( $network_activation  == '' ) ){ // blog activated separately on network         
    165 
    166165               
    167166                $twiz_privacy_question_answered = get_option('twiz_privacy_question_answered');
     
    176175               
    177176            }else if( is_multisite() and ( $network_activation  == '1' ) ){  // network activated after blog activated separately on network
    178      
     177            
    179178                $is_overriding_network_settings = ($is_overriding_network_settings == '') ? '0' : $is_overriding_network_settings ;
    180179                $twiz_privacy_question_answered = get_site_option('twiz_privacy_question_answered');
     
    729728        }
    730729       
     730        if( !isset($this->admin_option[parent::KEY_DELETE_ALL] ) ) { $this->admin_option[parent::KEY_DELETE_ALL] = ''; }
     731        if( !isset($admin_option[parent::KEY_DELETE_ALL] ) ) { $admin_option[parent::KEY_DELETE_ALL] = ''; }
     732        if( $this->admin_option[parent::KEY_DELETE_ALL] == '' ) { $this->admin_option[parent::KEY_DELETE_ALL] = '1'; }
     733        if( $admin_option[parent::KEY_DELETE_ALL] == '' ) { $admin_option[parent::KEY_DELETE_ALL] = '1'; }
    731734       
    732735        if( ( $this->admin_option[parent::KEY_DELETE_ALL] == '1' ) or ( $admin_option[parent::KEY_DELETE_ALL] == '1' ) ){
     
    741744                    $reset_stored_request = $wpdb->get_var( "show tables like '".$this->table."'" );                       
    742745                }
     746               
     747                if( !isset($this->admin_option[parent::KEY_REMOVE_CREATED_DIRECTORIES] ) ) { $this->admin_option[parent::KEY_REMOVE_CREATED_DIRECTORIES] = ''; }
     748                if( $this->admin_option[parent::KEY_REMOVE_CREATED_DIRECTORIES] == '' ) { $this->admin_option[parent::KEY_REMOVE_CREATED_DIRECTORIES] = '1'; }   
    743749               
    744750                // remove directories
  • the-welcomizer/trunk/twiz-index.php

    r1179719 r1180470  
    108108        }else{
    109109       
    110             if( !is_multisite() ){  // On network activation, twizInstall is called a first time with no params.
     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( plugin_dir_url( __FILE__ ) ) ) ) { 
    111114
    112115                $TwizInstallation  = new TwizInstallation();
    113116                $ok = $TwizInstallation->install( $network_activation );
    114117            }
     118
    115119        }           
    116120       
     
    121125        }
    122126    }}
     127   
     128 
    123129    // uninstall the plugin, drop table etc...
    124130    if(!function_exists('twizUninstall')){
Note: See TracChangeset for help on using the changeset viewer.