From 521fa124ef314cde4ee35981c29b794839390059 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 17 Mar 2007 19:38:23 +0000 Subject: [PATCH] r1480: Remove templates/stylevars.txt and the processing code involved in global.php --- global.php | 39 +--------------------------- templates/stylevars.txt | 57 ----------------------------------------- 2 files changed, 1 insertion(+), 95 deletions(-) delete mode 100644 templates/stylevars.txt diff --git a/global.php b/global.php index 6d09d29..ef97ce8 100755 --- a/global.php +++ b/global.php @@ -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 index 4432f8a..0000000 --- a/templates/stylevars.txt +++ /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 -- 2.22.5