phocoa/modules/css/css.php
line 33: remove WWW_ROOT portion from URI first then split or the vars get messed up.
https://gist.github.com/1067396/8ed6ead1aa132ecaf41c84d969028457ad49dbc7
@@ -30,7 +30,7 @@ class css extends WFModule { // determine skin type/skin/theme $cssTemplate = $skinName = $skinThemeName = NULL;
-
@list(,,,$cssTemplate, $skinTypeName, $skinName, $skinThemeName) = split('/', $_SERVER['REQUEST_URI']); -
@list(,,,$cssTemplate, $skinTypeName, $skinName, $skinThemeName) = split('/', subStr($_SERVER['REQUEST_URI'], strLen(WWW_ROOT))); $cssFilePath = WFWebApplication::appDirPath(WFWebApplication::DIR_SKINS) . '/' . $skinTypeName . '/'. $skinName . '/' . $cssTemplate;
What is the issue here?
Is it if WWW_ROOT has / in it?
Alan
have not been able to use WWW_ROOT without a '/' in it --> errors all over the place. when WWW_ROOT is set to '' (empty) all urls get a '/' prepended. (a quick search for WWW_ROOT on all files in the framework shows it nicely)
ergo if one wants to use WWW_ROOT it is essential to start it off with a '/' --> only here do we have an error unless the suggest patch is applied.
Oh yes that sounds correct, you must either have it BLANK or with a leading / is that what you're saying?
That sounds correct.
If that's the case, what does your patch do?
Alan
On Jul 22, 2011, at 4:22 PM, SwissalpS wrote:
have not been able to use WWW_ROOT without a '/' in it --> errors all over the place. when WWW_ROOT is set to '' (empty) all urls get a '/' prepended. (a quick search for WWW_ROOT on all files in the framework shows it nicely)
ergo if one wants to use WWW_ROOT it is essential to start it off with a '/' --> only here do we have an error unless the suggest patch is applied.
Reply to this email directly or view it on GitHub: https://github.com/apinstein/phocoa/issues/27#issuecomment-1634766
fix the problem
try the lines substituting values, the list() function will throw an error, or the resulting path will be all wonky. hard to describe, best tested as isolated code.
I use TextWrangler with a keyboard shortcut to run code directly from the editor. All I need to do is open a new document from a php template: '#!/usr/local/php5/bin/php
'