[switchyard] r786 committed - Silly bugfix in bootstrap. str_replace() apparently doesn't like getti...

0 views
Skip to first unread message

codesite...@google.com

unread,
Oct 1, 2009, 3:52:22 PM10/1/09
to switchy...@googlegroups.com
Revision: 786
Author: intuiworx
Date: Thu Oct 1 12:51:33 2009
Log: Silly bugfix in bootstrap. str_replace() apparently doesn't like
getting only two of the three required parameters. Also set error_reporting
to E_ALL at the beginning of the script, just to be on the safe side.
http://code.google.com/p/switchyard/source/detail?r=786

Modified:
/framework/trunk/app/core/bootstrap.php
/framework/trunk/index.php

=======================================
--- /framework/trunk/app/core/bootstrap.php Wed Sep 30 14:33:57 2009
+++ /framework/trunk/app/core/bootstrap.php Thu Oct 1 12:51:33 2009
@@ -9,7 +9,7 @@
require 'SwitchYard.class.php';

// Define some necessary constants.
-define('SY_ROOTDIR', str_replace('/app/core', '', dirname(__FILE__)));
+define('SY_ROOTDIR', realpath(str_replace('/app/core', '',
dirname(__FILE__))));
define('SY_APPDIR', SY_ROOTDIR.'/app');
define('SY_CNFDIR', SY_APPDIR.'/conf');
define('SY_COREDIR', SY_APPDIR.'/core');
@@ -21,7 +21,7 @@
define('SY_THEMEDIR', SY_ROOTDIR.'/themes');

if (preg_match('/index\.php$/', $_SERVER['SCRIPT_FILENAME'])) {
- $rootdir = str_replace(SY_ROOTDIR, str_replace('/index.php', '',
$_SERVER['SCRIPT_FILENAME']));
+ $rootdir = str_replace(SY_ROOTDIR, '', str_replace('/index.php', '',
realpath($_SERVER['SCRIPT_FILENAME'])));
if (empty($rootdir)) $rootdir = '/';
define('SY_CLI', false);
define('SY_HTTPDIR', $rootdir);
=======================================
--- /framework/trunk/index.php Wed Sep 30 14:33:57 2009
+++ /framework/trunk/index.php Thu Oct 1 12:51:33 2009
@@ -3,12 +3,13 @@
/**
* SwitchYard Master Controller Script
* @author Jeremy Clifton <j.cl...@4-8-4.com>
- * @version 3.1.4
+ * @version 3.1.5
* @copyright 2005-2009 4-8-4 Software Works, LLC
* @license BSD
*/

-define('SY_VERSION', '3.1.4');
+error_reporting(E_ALL);
+define('SY_VERSION', '3.1.5');
require 'app/core/bootstrap.php';
SwitchYard::$router = new SwitchYard_Router();
SwitchYard::$router->dispatch();

Reply all
Reply to author
Forward
0 new messages