r1480: Remove templates/stylevars.txt and the processing code involved in global.php
authorRobert Sesek <rsesek@bluestatic.org>
Sat, 17 Mar 2007 19:38:23 +0000 (19:38 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Sat, 17 Mar 2007 19:38:23 +0000 (19:38 +0000)
global.php
templates/stylevars.txt [deleted file]

index 6d09d291abf1fb49fe5c07c56d91626ea277ec94..ef97ce8c33759d179655a7979e4c8b281d4e5355 100755 (executable)
@@ -41,45 +41,8 @@ $show['admin'] = (bool)can_perform('canadminpanel');
 $show['newreport'] = (bool)can_perform('cansubmitbugs');
 $show['search'] = (bool)can_perform('cansearch');
 
-if (!defined('NO_TEMPLATES') OR (defined('NO_TEMPLATES') AND constant('NO_TEMPLATES') == true))
+if (!(defined('NO_TEMPLATES') AND constant('NO_TEMPLATES') == true))
 {
-       // ###################################################################
-       // do style vars
-       if (($raw = @file_get_contents('./templates/stylevars.txt')) !== false)
-       {
-               // remove comments
-               $raw = preg_replace('#/\*(.*?)\*/#s', '', $raw);
-               $raw = trim($raw);
-               
-               // create individual vars
-               $varsraw = explode(';', $raw);
-               foreach ($varsraw AS $var)
-               {
-                       if (($var = trim($var)) == '')
-                       {
-                               continue;
-                       }
-                       
-                       // split into varname - value pair
-                       $temp = explode(':', $var);
-                       
-                       // clean up varnames
-                       $varname = trim($temp[0]);
-                       $varname = preg_replace('#[^a-z0-9]#i', '_', $varname);
-                       
-                       // clean up values
-                       $value = trim($temp[1]);
-                       $value = preg_replace('#[^a-z0-9%\-\.\#]#i', '', $value);
-                       
-                       // put it in the array
-                       $stylevar["$varname"] = $value;
-               }
-       }
-       else
-       {
-               trigger_error('StyleVars file (./templates/stylevars.txt) could not be loaded', E_USER_WARNING);
-       }
-       
        // ###################################################################
        // cache templates
        $globaltemplates = array(
diff --git a/templates/stylevars.txt b/templates/stylevars.txt
deleted file mode 100644 (file)
index 4432f8a..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*=====================================================================*\
-|| ###################################################################
-|| # Bugdar [#]version[#]
-|| # Copyright ©2002-[#]year[#] Blue Static
-|| #
-|| # This program is free software; you can redistribute it and/or modify
-|| # it under the terms of the GNU General Public License as published by
-|| # the Free Software Foundation; version [#]gpl[#] of the License.
-|| #
-|| # This program is distributed in the hope that it will be useful, but
-|| # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-|| # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-|| # more details.
-|| #
-|| # You should have received a copy of the GNU General Public License along
-|| # with this program; if not, write to the Free Software Foundation, Inc.,
-|| # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
-|| ###################################################################
-\*=====================================================================*/
-
-/*
-This file is parsed to create PHP variables that
-are used in templates with the $stylevar[] array.
-It is similar to how a CSS element would be done.
-
-Each line has:
-variablename: value;
-
-Only letters and numbers are valid in variable names;
-everything else is converted to an undescore.
-
-Values only are allowed to have numbers, letters, dashes,
-periods/decimals, the number/pound sign, and the percent sign.
-
-Comments are only valid in C++ style (the type of comment this is).
-*/
-
-/* table elements */
-
-border: 0;
-spacing: 2;
-padding: 2;
-
-/* page elements */
-
-normal-width: 100%;
-alternate-width: 45%;
-
-/* alternate background color used when status colors aren't displayed */
-alt-color: #BFCCCF;
-
-/*=====================================================================*\
-|| ###################################################################
-|| # $HeadURL$
-|| # $Id$
-|| ###################################################################
-\*=====================================================================*/
\ No newline at end of file