Theme work with focusbusiness and baseadmin
Improvements to NAVBAR, updates to StaticList methods, other minor items Enable product category rendering and other minor improvements Added ADSL-large category price plan
This commit is contained in:
@@ -10,6 +10,47 @@
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
abstract class Kohana extends Kohana_Core {
|
||||
/**
|
||||
* Work out our Class Name as per Kohana's standards
|
||||
*/
|
||||
public static function classname($name) {
|
||||
return str_replace(' ','_',ucwords(strtolower(str_replace('_',' ',$name))));
|
||||
}
|
||||
|
||||
/**
|
||||
* Find files using a multi-site enabled application
|
||||
*
|
||||
* In order of precedence, we'll return:
|
||||
* 1) site-theme file, ie: site/X/THEME/${file}
|
||||
* 2) site file, ie: site/X/${file}
|
||||
* 3) theme file, ie: THEME/${file}
|
||||
* 4) normal search, ie: ${file}
|
||||
*/
|
||||
public static function find_file($dir,$file,$ext=NULL,$array=FALSE) {
|
||||
// Limit our scope to the following dirs
|
||||
// @note, we cannot have classes checked, since Config() doesnt exist yet
|
||||
$dirs = array('views','media');
|
||||
|
||||
if (! in_array($dir,$dirs) OR PHP_SAPI === 'cli')
|
||||
return parent::find_file($dir,$file,$ext,$array);
|
||||
|
||||
// Our search order.
|
||||
$prefixes = array(
|
||||
sprintf('site/%s/%s/',Config::siteid(),Config::theme()),
|
||||
sprintf('site/%s/',Config::siteid()),
|
||||
Config::theme().'/',
|
||||
'',
|
||||
);
|
||||
|
||||
foreach ($prefixes as $p) {
|
||||
if ($x = parent::find_file($dir,$p.$file,$ext,$array))
|
||||
return $x;
|
||||
}
|
||||
|
||||
// We found a site path.
|
||||
return $x;
|
||||
}
|
||||
|
||||
/**
|
||||
* @compat Restore KH 3.1 functionality
|
||||
* @var boolean True if Kohana is running from the command line
|
||||
@@ -45,12 +86,5 @@ abstract class Kohana extends Kohana_Core {
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Work out our Class Name as per Kohana's standards
|
||||
*/
|
||||
public static function classname($name) {
|
||||
return str_replace(' ','_',ucwords(strtolower(str_replace('_',' ',$name))));
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user