[Solar-svn] Revision 3043
pmjones at solarphp.com
pmjones at solarphp.com
Tue Mar 25 07:41:56 CDT 2008
Solar_Controller_Front: [FIX] Force page name to lower-case for comparisons; helps prevent "Foo", "fOO", "FoO", etc. matching to a disabled "foo" page. Thanks for the catch, Nate Abele.
Modified: trunk/Solar/Controller/Front.php
===================================================================
--- trunk/Solar/Controller/Front.php 2008-03-23 13:59:08 UTC (rev 3042)
+++ trunk/Solar/Controller/Front.php 2008-03-25 12:41:56 UTC (rev 3043)
@@ -154,7 +154,7 @@
}
// first path-element is the page-name.
- $page = reset($uri->path);
+ $page = strtolower(reset($uri->path));
if (empty($page)) {
// page-name is blank. get the default class.
// remove the empty element from the path.
@@ -222,7 +222,7 @@
$class = $this->_routing[$page];
} else {
// no explicit route, try to find a matching class
- $page = str_replace('-',' ', $page);
+ $page = str_replace('-',' ', strtolower($page));
$page = str_replace(' ', '', ucwords(trim($page)));
$class = $this->_stack->load($page, false);
}
More information about the Solar-svn
mailing list