Thread: [Openfirst-cvscommit] SF.net SVN: openfirst: [186] trunk/src/includes/globals.php
Brought to you by:
xtimg
From: <ast...@us...> - 2006-06-22 22:57:20
|
Revision: 186 Author: astronouth7303 Date: 2006-06-22 15:57:16 -0700 (Thu, 22 Jun 2006) ViewCVS: http://svn.sourceforge.net/openfirst/?rev=186&view=rev Log Message: ----------- Sets $ogFooter when installing. Modified Paths: -------------- trunk/src/includes/globals.php Modified: trunk/src/includes/globals.php =================================================================== --- trunk/src/includes/globals.php 2006-06-22 22:52:27 UTC (rev 185) +++ trunk/src/includes/globals.php 2006-06-22 22:57:16 UTC (rev 186) @@ -50,6 +50,11 @@ } else { $ogHeader = "../style/headers.php"; } + if(is_readable("style/footers.php")) { + $ogFooter = "style/footers.php"; + } else { + $ogFooter = "../style/footers.php"; + } } define('osUNIX', 'unix'); @@ -209,4 +214,4 @@ $ogUser->saveData(); session_write_close(); } -?> \ No newline at end of file +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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. |
From: <ast...@us...> - 2006-07-04 14:06:09
|
Revision: 208 Author: astronouth7303 Date: 2006-07-04 07:06:05 -0700 (Tue, 04 Jul 2006) ViewCVS: http://svn.sourceforge.net/openfirst/?rev=208&view=rev Log Message: ----------- Add optional $ogCompress, defaulting to true. Modified Paths: -------------- trunk/src/includes/globals.php Modified: trunk/src/includes/globals.php =================================================================== --- trunk/src/includes/globals.php 2006-07-04 14:04:45 UTC (rev 207) +++ trunk/src/includes/globals.php 2006-07-04 14:06:05 UTC (rev 208) @@ -105,17 +105,6 @@ set_include_path( get_include_path().PATH_SEPARATOR."$configdir/".PATH_SEPARATOR."."); unset($configdir); -// Enable output compression, if zlib is available and no output has been sent -if ( function_exists('ob_gzhandler') && - !ini_get('zlib.output_compression') && - !headers_sent() - ) { - @ob_start('ob_gzhandler'); // If already compressing, shut up. - header('x-of-compressing: yes'); -} else if (!headers_sent()) { - header('x-of-compressing: no'); -} - require_once('functions.php'); // This should been done at the earliest possible time. // Which is now. @@ -136,6 +125,8 @@ $ogMoreHeadItems = array(); $ogMoreStyles = ''; +$ogCompress = true; + if (!defined('OPENFIRST_NO_INSTALLATION')) { $ogSQLTablePrefix = 'ofirst_'; $ogDataBaseType = dbMYSQL; @@ -146,6 +137,18 @@ require_once('sitesettings.php'); } +// Enable output compression, if zlib is available and no output has been sent +if ( !function_exists('ob_gzhandler') && + !ini_get('zlib.output_compression') && + !headers_sent() && + $ogCompress + ) { + @ob_start('ob_gzhandler'); // If already compressing, shut up. + header('x-of-compressing: yes'); +} else if (!headers_sent()) { + header('x-of-compressing: no'); +} + if (!defined('OPENFIRST_NO_INSTALLATION')) { $ogDB = ofCreateDataBase($ogDataBaseType, $ogSQLServer, $ogSQLUser, $ogSQLPassword); if (!defined('OPENFIRST_INSTALLATION_SCRIPT')) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |