[Openfirst-cvscommit] SF.net SVN: openfirst: [195] trunk/src/includes/globals.php
Brought to you by:
xtimg
From: <ast...@us...> - 2006-06-23 04:57:15
|
Revision: 195 Author: astronouth7303 Date: 2006-06-22 21:57:11 -0700 (Thu, 22 Jun 2006) ViewCVS: http://svn.sourceforge.net/openfirst/?rev=195&view=rev Log Message: ----------- -more htmlentities() -checks before trying to set headers -updated config vars -use wrapper instead of raw SQL Modified Paths: -------------- trunk/src/includes/globals.php Modified: trunk/src/includes/globals.php =================================================================== --- trunk/src/includes/globals.php 2006-06-23 04:55:23 UTC (rev 194) +++ trunk/src/includes/globals.php 2006-06-23 04:57:11 UTC (rev 195) @@ -41,7 +41,7 @@ $path = "../../config/first.php"; } $path = htmlentities($path); - die( "You'll have to <a href=\"$path\">set openFIRST up</a> first!" ); + die( "You'll have to <a href=\"".htmlentities($path)."\">set openFIRST up</a> first!" ); } if (defined('OPENFIRST_NO_INSTALLATION')) { @@ -112,7 +112,7 @@ ) { @ob_start('ob_gzhandler'); // If already compressing, shut up. header('x-of-compressing: yes'); -} else { +} else if (!headers_sent()) { header('x-of-compressing: no'); } @@ -166,13 +166,13 @@ // Determine what module the user is viewing if (!defined('OPENFIRST_NO_INSTALLATION')) { - $curmodule = str_replace($BasePath, '', $_SERVER['SCRIPT_NAME']); + $curmodule = str_replace($ogBasePath, '', $_SERVER['SCRIPT_NAME']); $curmodule = substr($curmodule, 1, strpos($curmodule, '/', 2) - 1); } if (!defined('OPENFIRST_NO_INSTALLATION')) { // Include the functions using glob(); - foreach (glob("$fBasePath/includes/functions/*.php") as $filename) { + foreach (glob("$ogfBasePath/includes/functions/*.php") as $filename) { include_once($filename); } } @@ -186,8 +186,7 @@ 2. I'd rather iterate through the array once */ $ogModuleManager = new ModuleManager; - $res = $ogDB->query('SELECT '.$ogDB->quoteField('dir'). - ' FROM '.$ogDB->quoteTable('config')); + $res = $ogDB->select('config', array('dir')); if($ogDB->errorNumber() != 0) { trigger_error('Error while listing modules!', E_USER_ERROR); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |