Permalink
Browse files

Revert "Bring into line with OpenFISMA coding standards (more strict …

…than Zend)"

This reverts commit 08c5cee.
  • Loading branch information...
1 parent 998e322 commit e2c49d035729fbb2397d7684444e5780cb546564 Adam Moore committed Feb 1, 2010
Showing with 16 additions and 17 deletions.
  1. +8 −8 phploader/combo.php
  2. +2 −2 phploader/combo_functions.inc.php
  3. +6 −7 phploader/loader.php
View
@@ -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
@@ -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! -->');
}
}
@@ -117,7 +117,7 @@
}
echo $rawScript;
} else {
- $rawCss = '';
+ $rawCSS = '';
$cssResourceList = $loader->css_data();
foreach ($cssResourceList["css"] as $cssResource=>$val) {
foreach (
@@ -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! -->');
}
@@ -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(
@@ -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');
}
View
@@ -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
@@ -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!");
}
/*
@@ -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;
@@ -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'];

0 comments on commit e2c49d0

Please sign in to comment.