Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: glydetech/ko3.xhtml
base: bafe03f07a
...
head fork: glydetech/ko3.xhtml
compare: 8154af0c81
Checking mergeability… Don't worry, you can still create the pull request.
  • 3 commits
  • 2 files changed
  • 0 commit comments
  • 2 contributors
Showing with 17 additions and 7 deletions.
  1. +8 −3 classes/head.php
  2. +9 −4 classes/xhtml.php
View
11 classes/head.php
@@ -55,7 +55,7 @@ class Head {
* @param array Default values
* @return Head
*/
- public static function instance(array $data = array())
+ public static function instance(array $data = array(), $config_name = 'default')
{
// Check if instance exists
if (self::$_instance === NULL)
@@ -65,7 +65,7 @@ public static function instance(array $data = array())
self::$_instance = new self;
// Add values from config file
- self::$_instance->add(Kohana::config('xhtml.default.head'));
+ self::$_instance->add(Kohana::config('xhtml.'.$config_name.'.head'));
}
// Add values from supplied data
@@ -167,7 +167,12 @@ public function __toString()
catch (Exception $e)
{
// Display the exception message
- Kohana::exception_handler($e);
+ if (substr(Kohana::VERSION, 0, 3) == '3.0')
+ {
+ Kohana::exception_handler($e);
+ } else {
+ Kohana_Exception::handler($e);
+ }
return '';
}
}
View
13 classes/xhtml.php
@@ -58,7 +58,7 @@ class Xhtml {
* Get the singleton instance of Xhtml.
* @return Xhtml
*/
- public static function instance($file = NULL)
+ public static function instance($file = NULL, $config_name = 'default')
{
if (self::$_instance === NULL)
{
@@ -66,10 +66,10 @@ public static function instance($file = NULL)
self::$_instance = new self($file);
// Set instance of Head class
- self::$head = Head::instance();
+ self::$head = Head::instance(array(), $config_name);
// Set defaults from config
- $default = Kohana::config('xhtml.default');
+ $default = Kohana::config('xhtml.'.$config_name);
foreach (array('doctype', 'langcode', 'htmlatts', 'body') as $key)
{
if (isset($default[$key]) AND !empty($default[$key]))
@@ -178,7 +178,12 @@ public function __toString()
catch (Exception $e)
{
// Display the exception message
- Kohana::exception_handler($e);
+ if (substr(Kohana::VERSION, 0, 3) == '3.0')
+ {
+ Kohana::exception_handler($e);
+ } else {
+ Kohana_Exception::handler($e);
+ }
return '';
}
}

No commit comments for this range

Something went wrong with that request. Please try again.