Plugin Directory

Changeset 334645


Ignore:
Timestamp:
01/19/2011 04:07:04 PM (15 years ago)
Author:
rukbat
Message:

Upgrade to version 1.2.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nginx-manager/trunk/admin/install.php

    r326618 r334645  
    3030    if ( empty( $nginxm_global_options ) ) {
    3131       
    32         // Cookie and cache timelife
    33         $nginxm_global_options['cookie_regexp']         = '/wordpress_(?!test_cookie)|comment_author|wp-postpass/';
    34         $nginxm_global_options['cache_ttl']             = '600';
    35        
    36         // Log settings
    37         $nginxm_global_options['log_level']             = 'INFO';
    38         $nginxm_global_options['log_filesize']          = 5;
    39        
    40         // Set plugin version, @since Nginx Manager 1.2
    41         $nginxm_global_options['current_db_version']    = $nginxm->db_version;
     32        $nginxm_global_options = nginxm_get_default_global_options();
    4233       
    4334        update_site_option("nginxm_global_options", $nginxm_global_options);
     
    6051            if ( empty( $nginxm_options ) ) {
    6152               
    62                 // Options for homepage, personal URLs and an array for capture URL
    63                 $nginxm_options['automatically_purge_homepage']                 = 1;
    64                 $nginxm_options['automatically_purge_purls']                    = 1;
    65                 $nginxm_options['purgeable_url']                                = array();
    66                
    67                 // Options "When a post/page is modified"
    68                 $nginxm_options['automatically_purge_page']                     = 1;
    69                 $nginxm_options['automatically_purge_page_archive']             = 1;
    70                 $nginxm_options['automatically_purge_page_custom_taxa']         = 1;
    71                
    72                 // Options "When a new comment is published"
    73                 $nginxm_options['automatically_purge_comment_page']             = 1;
    74                 $nginxm_options['automatically_purge_comment_archive']          = 1;
    75                 $nginxm_options['automatically_purge_comment_custom_taxa']      = 1;
     53                $nginxm_options = nginxm_get_default_local_options();
    7654               
    7755                update_blog_option($b->userblog_id, "nginxm_options", $nginxm_options);
     
    8866        if ( empty( $nginxm_options ) ) {
    8967           
    90             // Options for homepage, personal URLs and an array for capture URL
    91             $nginxm_options['automatically_purge_homepage']                 = 1;
    92             $nginxm_options['automatically_purge_purls']                    = 1;
    93             $nginxm_options['purgeable_url']                                = array();
    94            
    95             // Options "When a post/page is modified"
    96             $nginxm_options['automatically_purge_page']                     = 1;
    97             $nginxm_options['automatically_purge_page_archive']             = 1;
    98             $nginxm_options['automatically_purge_page_custom_taxa']         = 1;
    99            
    100             // Options "When a new comment is published"
    101             $nginxm_options['automatically_purge_comment_page']             = 1;
    102             $nginxm_options['automatically_purge_comment_archive']          = 1;
    103             $nginxm_options['automatically_purge_comment_custom_taxa']      = 1;
     68            $nginxm_options = nginxm_get_default_local_options();
    10469           
    10570            update_option("nginxm_options", $nginxm_options);
     
    163128}
    164129
     130/**
     131 * Return an array with default global options
     132 *
     133 * @return Array
     134 * @since Nginx Manager 1.2.1
     135 */
     136function nginxm_get_default_global_options() {
     137   
     138    global $nginxm;
     139   
     140    $nginxm_global_options = array();
     141   
     142    // Cookie and cache timelife
     143    $nginxm_global_options['cookie_regexp']         = '/wordpress_(?!test_cookie)|comment_author|wp-postpass/';
     144    $nginxm_global_options['cache_ttl']             = '600';
     145   
     146    // Log settings
     147    $nginxm_global_options['log_level']             = 'INFO';
     148    $nginxm_global_options['log_filesize']          = 5;
     149   
     150    // Set plugin version, @since Nginx Manager 1.2
     151    $nginxm_global_options['current_db_version']    = $nginxm->db_version;
     152   
     153    return $nginxm_global_options;
     154   
     155}
     156
     157/**
     158 * Return an array with default local options
     159 *
     160 * @return Array
     161 * @since Nginx Manager 1.2.1
     162 */
     163function nginxm_get_default_local_options() {
     164   
     165    $nginxm_options = array();
     166   
     167    // Options for homepage, personal URLs and an array for capture URL
     168    $nginxm_options['automatically_purge_homepage']                 = 1;
     169    $nginxm_options['automatically_purge_purls']                    = 1;
     170    $nginxm_options['purgeable_url']                                = array();
     171   
     172    // Options "When a post/page is modified"
     173    $nginxm_options['automatically_purge_page']                     = 1;
     174    $nginxm_options['automatically_purge_page_archive']             = 1;
     175    $nginxm_options['automatically_purge_page_custom_taxa']         = 1;
     176   
     177    // Options "When a new comment is published"
     178    $nginxm_options['automatically_purge_comment_page']             = 1;
     179    $nginxm_options['automatically_purge_comment_archive']          = 1;
     180    $nginxm_options['automatically_purge_comment_custom_taxa']      = 1;
     181   
     182    return $nginxm_options;
     183   
     184}
     185
    165186?>
Note: See TracChangeset for help on using the changeset viewer.