Skip to content

Commit

Permalink
Revert "Bring into line with OpenFISMA coding standards (more strict …
Browse files Browse the repository at this point in the history
…than Zend)"

This reverts commit 08c5cee.
  • Loading branch information
Adam Moore committed Feb 1, 2010
1 parent 998e322 commit e2c49d0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 17 deletions.
16 changes: 8 additions & 8 deletions phploader/combo.php
Expand Up @@ -84,7 +84,7 @@
file_exists($localPathToBuild) === false ||
is_readable($localPathToBuild) === false
) {
throw new Exception('Unable to locate the YUI build directory!');
die('<!-- Unable to locate the YUI build directory! -->');
}

//Detect and load the required components now
Expand All @@ -95,7 +95,7 @@
//Add module to array for loading
$yuiComponents[] = $parts[2];
} else {
throw new Exception('Unable to determine module name!');
die('<!-- Unable to determine module name! -->');
}
}

Expand All @@ -117,7 +117,7 @@
}
echo $rawScript;
} else {
$rawCss = '';
$rawCSS = '';
$cssResourceList = $loader->css_data();
foreach ($cssResourceList["css"] as $cssResource=>$val) {
foreach (
Expand Down Expand Up @@ -147,20 +147,20 @@
); // AlphaImageLoader relative paths (e.g.)
// AlphaImageLoader(src='../../foo.png')

$rawCss .= $crtResourceContent;
$rawCSS .= $crtResourceContent;
}
}

//Cleanup build path dups caused by relative paths that already
//included the build directory
$rawCss = str_replace("/build/build/", "/build/", $rawCss);
$rawCSS = str_replace("/build/build/", "/build/", $rawCSS);

if (APC_AVAIL === true) {
apc_store(server(true), $rawCss, APC_TTL);
apc_store(server(true), $rawCSS, APC_TTL);
}
echo $rawCss;
echo $rawCSS;
}
}
} else {
throw new Exception('No YUI modules defined!');
die('<!-- No YUI modules defined! -->');
}
4 changes: 2 additions & 2 deletions phploader/combo_functions.inc.php
Expand Up @@ -9,7 +9,7 @@
//server(): Computes the base URL of the current page (protocol, server, path)
//credit: http://code.google.com/p/simple-php-framework/
//(modified version of full_url), license: MIT
function server($includeRequestUri=false)
function server($includeRequestURI=false)
{
$s = getenv('HTTPS') ? '' : (getenv('HTTPS') == 'on') ? 's' : '';
$protocol = substr(
Expand All @@ -19,7 +19,7 @@ function server($includeRequestUri=false)
$port = (getenv('SERVER_PORT') == '80') ? '' : (":".getenv('SERVER_PORT'));
$server = $protocol . "://" . getenv('HTTP_HOST') . $port;

if ($includeRequestUri === true) {
if ($includeRequestURI === true) {
$server .= getenv('REQUEST_URI');
}

Expand Down
13 changes: 6 additions & 7 deletions phploader/loader.php
Expand Up @@ -51,6 +51,7 @@
define('YUI_TYPE', 'type');
define('YUI_URL', 'url');


/**
* The YUI PHP loader base class which provides dynamic server-side loading for
* YUI
Expand Down Expand Up @@ -337,14 +338,12 @@ class YAHOO_util_Loader
* @param {boolean} noYUI Pass true if you do not want the YUI metadata
*/
function YAHOO_util_Loader(
$yuiVersion, $cacheKey=null, $modules=null, $noYui=false
$yuiVersion, $cacheKey=null, $modules=null, $noYUI=false
)
{
if (!isset($yuiVersion)) {
throw new Exception(
"Error: the first parameter of YAHOO_util_Loader must specify " .
"which version of YUI to use!"
);
die("Error: The first parameter of YAHOO_util_Loader must specify "
. "which version of YUI to use!");
}

/*
Expand All @@ -368,7 +367,7 @@ function YAHOO_util_Loader(
$inf = json_decode($jsonConfigString, true);
$GLOBALS['yui_current'] = $inf;
} else {
throw new Exception("Unable to find a suitable YUI metadata file!");
die("Unable to find a suitable YUI metadata file!");
}

global $yuiCurrent;
Expand Down Expand Up @@ -399,7 +398,7 @@ function YAHOO_util_Loader(
$this->filters = $cache[YUI_FILTERS];
} else {
// set up the YUI info for the current version of the lib
if ($noYui) {
if ($noYUI) {
$this->modules = array();
} else {
$this->modules = $yuiCurrent['moduleInfo'];
Expand Down

0 comments on commit e2c49d0

Please sign in to comment.