Changeset 484363
- Timestamp:
- 01/04/2012 10:06:49 AM (14 years ago)
- Location:
- nginx-manager/trunk
- Files:
-
- 6 edited
-
admin/admin.php (modified) (2 diffs)
-
admin/install.php (modified) (1 diff)
-
admin/upgrade.php (modified) (2 diffs)
-
nginx-manager.php (modified) (2 diffs)
-
nginxmNginx.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
nginx-manager/trunk/admin/admin.php
r484358 r484363 186 186 </table> 187 187 188 <<<<<<< .mine189 188 <h4>Mobile</h4> 190 189 … … 210 209 </table> 211 210 212 =======213 <h4>Mobile</h4>214 215 <table class="form-table">216 <tbody>217 <tr valign="top">218 <th scope="row">Cache if mobile:</th>219 <td>220 <fieldset>221 <legend class="screen-reader-text"><span>If the request is from a mobile device disable cache</span></legend>222 <label for="mobile_uncache"><input type="checkbox" value="1" id="mobile_uncache" name="mobile_uncache"<?php checked( $nginxm->global_options['mobile_uncache'], 1 ); ?>> If the request is from a mobile device disable cache</label><br />223 </fieldset>224 </td>225 </tr>226 <tr valign="top">227 <th scope="row"><label for="mobile_regexp">Regular expression for mobile:</label></th>228 <td>229 <input id="mobile_regexp" class="large-text" type="text" name="mobile_regexp" value="<?php echo stripslashes($nginxm->global_options['mobile_regexp']); ?>" />230 <span class="description">HTTP User Agents that match this regexp are not cached. The Regexp is not validated.</span>231 </td>232 </tr>233 </tbody>234 </table>235 236 >>>>>>> .r484353237 211 <br /> 238 212 -
nginx-manager/trunk/admin/install.php
r484358 r484363 151 151 $nginxm_global_options['current_db_version'] = $nginxm->db_version; 152 152 153 <<<<<<< .mine154 153 // Mobile options, @since Nginx Manager 1.3.4 155 154 $nginxm_global_options['mobile_uncache'] = 1; 156 155 $nginxm_global_options['mobile_regexp'] = '#2.0 MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo Wii|Nitro|Nokia|Opera Mini|Palm|PlayStation Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows CE|WinWAP|YahooSeeker/M1A1-R2D2|NF-Browser|iPhone|iPod|Android|BlackBerry9530|G-TU915 Obigo|LGE VX|webOS|Nokia5800#'; 157 156 158 =======159 // Mobile options, @since Nginx Manager 1.3.4160 $nginxm_global_options['mobile_uncache'] = 1;161 $nginxm_global_options['mobile_regexp'] = '/2\.0 MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine\/3\.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA\/WX310K|LG\/U990|MIDP-2\.|MMEF20|MOT-V|NetFront|Newt|Nintendo Wii|Nitro|Nokia|Opera Mini|Palm|PlayStation Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian OS|SymbianOS|TS21i-10|UP\.Browser|UP\.Link|webOS|Windows CE|WinWAP|YahooSeeker\/M1A1-R2D2|NF-Browser|iPhone|iPod|Android|BlackBerry9530|G-TU915 Obigo|LGE VX|webOS|Nokia5800/';162 163 >>>>>>> .r484353164 157 return $nginxm_global_options; 165 158 -
nginx-manager/trunk/admin/upgrade.php
r484358 r484363 144 144 } 145 145 146 <<<<<<< .mine147 146 /* 148 147 * v1.3 -> v1.3.4 … … 168 167 } 169 168 170 =======171 /*172 * v1.3 -> v1.3.4173 * 1) Set options for mobile174 * */175 if (version_compare($current_db_version, '1.3.4', '<')) {176 177 echo "<h4>Updating up to 1.3.4</h4>";178 179 echo "<p><i>Setting global options for mobile</i></p>";180 181 $nginxm_global_options = get_site_option('nginxm_global_options');182 183 // Set184 $nginxm_global_options['mobile_uncache'] = 1;185 $nginxm_global_options['mobile_regexp'] = '/2\.0 MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine\/3\.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA\/WX310K|LG\/U990|MIDP-2\.|MMEF20|MOT-V|NetFront|Newt|Nintendo Wii|Nitro|Nokia|Opera Mini|Palm|PlayStation Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian OS|SymbianOS|TS21i-10|UP\.Browser|UP\.Link|webOS|Windows CE|WinWAP|YahooSeeker\/M1A1-R2D2|NF-Browser|iPhone|iPod|Android|BlackBerry9530|G-TU915 Obigo|LGE VX|webOS|Nokia5800/';186 187 update_site_option('nginxm_global_options', $nginxm_global_options);188 189 $nginxmNginx->log("UPGRADE :: Update to version 1.3.4 ... DONE");190 echo "<p><i>Update to version 1.3.4 ... DONE</i></p>";191 192 }193 194 >>>>>>> .r484353195 169 } else { 196 170 -
nginx-manager/trunk/nginx-manager.php
r484359 r484363 5 5 Description: Manage Nginx cache 6 6 Author: Simone Fumagalli & Marco Zanzottera 7 <<<<<<< .mine8 7 Version: 1.3.4.1 9 =======10 Version: 1.3.411 >>>>>>> .r48435312 8 Author URI: http://www.iliveinperego.com 13 9 Network: true … … 48 44 class nginxmLoader { 49 45 50 <<<<<<< .mine51 46 var $version = '1.3.4.1'; // Plugin version 52 47 var $db_version = '1.3.4'; // DB version, change it to show the upgrade page 53 =======54 var $version = '1.3.4'; // Plugin version55 var $db_version = '1.3.4'; // DB version, change it to show the upgrade page56 >>>>>>> .r48435357 48 var $minium_WP = '3.0'; 58 49 var $options = null; -
nginx-manager/trunk/nginxmNginx.php
r484361 r484363 41 41 42 42 // If the request is from a mobile device disable cache 43 <<<<<<< .mine44 43 if ( $nginxm->global_options['mobile_uncache'] ) { 45 44 $_mobile_regex = ( isset($nginxm->global_options['mobile_regexp']) && ($nginxm->global_options['mobile_regexp'] != '' ) ) ? $nginxm->global_options['mobile_regexp'] : '#2.0 MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo Wii|Nitro|Nokia|Opera Mini|Palm|PlayStation Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows CE|WinWAP|YahooSeeker/M1A1-R2D2|NF-Browser|iPhone|iPod|Android|BlackBerry9530|G-TU915 Obigo|LGE VX|webOS|Nokia5800#'; … … 47 46 $cache_ttl = 0; 48 47 } 49 =======50 if ( $nginxm->global_options['mobile_uncache'] ) {51 $_mobile_regex = ( isset($nginxm->global_options['mobile_regexp']) && ($nginxm->global_options['mobile_regexp'] != '' ) ) ? $nginxm->global_options['mobile_regexp'] : '/2\.0 MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine\/3\.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA\/WX310K|LG\/U990|MIDP-2\.|MMEF20|MOT-V|NetFront|Newt|Nintendo Wii|Nitro|Nokia|Opera Mini|Palm|PlayStation Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian OS|SymbianOS|TS21i-10|UP\.Browser|UP\.Link|webOS|Windows CE|WinWAP|YahooSeeker\/M1A1-R2D2|NF-Browser|iPhone|iPod|Android|BlackBerry9530|G-TU915 Obigo|LGE VX|webOS|Nokia5800/';52 if ( preg_match( $_mobile_regex, $_SERVER['HTTP_USER_AGENT'] ) ) {53 $cache_ttl = 0;54 }55 >>>>>>> .r48435356 48 } 57 49 -
nginx-manager/trunk/readme.txt
r484361 r484363 63 63 == Changelog == 64 64 65 <<<<<<< .mine66 65 = 1.3.4.1 (2012 01 04) = 67 66 * BUG : Fix mobile regex … … 73 72 * EDIT : CPT identification by options, not automatically 74 73 75 =======76 = 1.3.4 (2011 12 27) =77 * BUG : Now PurgeUrl also consider the query_string78 * NEW : Added an hook to run a function when a NGG gallery is purged. Hook name nm_ngg_gallery_purge79 * NEW : Added options to choose if purge if user agent is from a mobile device and edit the regex.80 * EDIT : CPT identification by options, not automatically81 82 >>>>>>> .r48435383 74 = 1.3.3 (2011 09 20) = 84 75 * NEW : If the request is from a mobile device disable cache
Note: See TracChangeset
for help on using the changeset viewer.