JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
better detection of running locally
authorJason Woofenden <jason@jasonwoof.com>
Sun, 1 Sep 2013 03:58:45 +0000 (23:58 -0400)
committerJason Woofenden <jason@jasonwoof.com>
Sun, 1 Sep 2013 03:58:45 +0000 (23:58 -0400)
code/cms.php
code/wfpl

index 4f42655..e2ef7d9 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 function cms_display($basename, &$tem) {
-       if(preg_match('/([.]l(ocal)?$)|^[0-9.]*$/', $_SERVER['HTTP_HOST'])) {
+       if(preg_match('/([.]l(ocal)?$)|^192[.]168[.]|^127.0.0.1$|^10[.]/', $_SERVER['HTTP_HOST'])) {
                $GLOBALS['wfpl_main_template']->set('$running_locally');
        }
        $tem->set('$host', this_host());
index 5a2ac79..e6a41aa 160000 (submodule)
--- a/code/wfpl
+++ b/code/wfpl
@@ -1 +1 @@
-Subproject commit 5a2ac791b1c0ae217a7dba9f972d22b900303932
+Subproject commit e6a41aa2c0b3bdf17ec5c734074665488f0cef43