summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-06-06 14:51:04 -0700
committerBharat Mediratta <bharat@menalto.com>2009-06-06 14:51:04 -0700
commitb179b106c2b4d3971498f513ffc71eff1b6b1a5d (patch)
treeccffecba610b9dfc72ba6f4057c54ca0c8ae9fb7
parentbccaad92bb3b2ecc7c95e5eaf728b9be6e8a3b3a (diff)
Update Kohana to r4409
-rw-r--r--system/core/Event.php4
-rw-r--r--system/helpers/html.php14
-rw-r--r--system/libraries/Profiler.php4
-rw-r--r--system/libraries/Router.php18
-rw-r--r--system/libraries/drivers/Database/Mssql.php2
5 files changed, 24 insertions, 18 deletions
diff --git a/system/core/Event.php b/system/core/Event.php
index 90944c37..06468a8d 100644
--- a/system/core/Event.php
+++ b/system/core/Event.php
@@ -4,7 +4,7 @@
* to be added to 'events'. Events can be run multiple times, and can also
* process event-specific data. By default, Kohana has several system events.
*
- * $Id: Event.php 4358 2009-05-27 17:24:25Z ixmatus $
+ * $Id: Event.php 4390 2009-06-04 03:05:36Z zombor $
*
* @package Core
* @author Kohana Team
@@ -206,7 +206,7 @@ final class Event {
foreach ($callbacks as $callback)
{
- call_user_func_array($callback, array(&$data));
+ call_user_func($callback);
}
// Do this to prevent data from getting 'stuck'
diff --git a/system/helpers/html.php b/system/helpers/html.php
index 9ad20d89..2c609567 100644
--- a/system/helpers/html.php
+++ b/system/helpers/html.php
@@ -2,7 +2,7 @@
/**
* HTML helper class.
*
- * $Id: html.php 4368 2009-05-27 21:58:51Z samsoir $
+ * $Id: html.php 4376 2009-06-01 11:40:39Z samsoir $
*
* @package Core
* @author Kohana Team
@@ -68,15 +68,21 @@ class html_Core {
* @param string link text
* @param array HTML anchor attributes
* @param string non-default protocol, eg: https
+ * @param boolean option to escape the title that is output
* @return string
*/
- public static function anchor($uri, $title = NULL, $attributes = NULL, $protocol = NULL)
+ public static function anchor($uri, $title = NULL, $attributes = NULL, $protocol = NULL, $escape_title = FALSE)
{
if ($uri === '')
{
$site_url = url::base(FALSE);
}
- elseif (strpos($uri, '://') === FALSE AND strpos($uri, '#') !== 0)
+ elseif (strpos($uri, '#') === 0)
+ {
+ // This is an id target link, not a URL
+ $site_url = $uri;
+ }
+ elseif (strpos($uri, '://') === FALSE)
{
$site_url = url::site($uri, $protocol);
}
@@ -96,7 +102,7 @@ class html_Core {
// Attributes empty? Use an empty string
.(is_array($attributes) ? html::attributes($attributes) : '').'>'
// Title empty? Use the parsed URL
- .html::specialchars((($title === NULL) ? $site_url : $title), FALSE).'</a>';
+ .($escape_title ? html::specialchars((($title === NULL) ? $site_url : $title), FALSE) : (($title === NULL) ? $site_url : $title)).'</a>';
}
/**
diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php
index 47d82ace..9da053fb 100644
--- a/system/libraries/Profiler.php
+++ b/system/libraries/Profiler.php
@@ -8,7 +8,7 @@
* POST Data - The name and values of any POST data submitted to the current page.
* Cookie Data - All cookies sent for the current request.
*
- * $Id: Profiler.php 4090 2009-03-19 01:27:45Z bharat $
+ * $Id: Profiler.php 4383 2009-06-03 00:17:24Z ixmatus $
*
* @package Profiler
* @author Kohana Team
@@ -104,7 +104,7 @@ class Profiler_Core {
$view = new View('kohana_profiler', $data);
// Return rendered view if $return is TRUE
- if ($return == TRUE)
+ if ($return === TRUE)
return $view->render();
// Add profiler data to the output
diff --git a/system/libraries/Router.php b/system/libraries/Router.php
index 6dc9b10c..ef0e1e47 100644
--- a/system/libraries/Router.php
+++ b/system/libraries/Router.php
@@ -2,7 +2,7 @@
/**
* Router
*
- * $Id: Router.php 4350 2009-05-14 18:58:18Z zombor $
+ * $Id: Router.php 4391 2009-06-04 03:10:12Z zombor $
*
* @package Core
* @author Kohana Team
@@ -213,17 +213,17 @@ class Router_Core {
elseif (isset($_SERVER['PHP_SELF']) AND $_SERVER['PHP_SELF'])
{
Router::$current_uri = $_SERVER['PHP_SELF'];
-
- if (($strpos_fc = strpos(Router::$current_uri, KOHANA)) !== FALSE)
- {
- // Remove the front controller from the current uri
- Router::$current_uri = substr(Router::$current_uri, $strpos_fc + strlen(KOHANA));
- }
}
-
+
+ if (($strpos_fc = strpos(Router::$current_uri, KOHANA)) !== FALSE)
+ {
+ // Remove the front controller from the current uri
+ Router::$current_uri = (string) substr(Router::$current_uri, $strpos_fc + strlen(KOHANA));
+ }
+
// Remove slashes from the start and end of the URI
Router::$current_uri = trim(Router::$current_uri, '/');
-
+
if (Router::$current_uri !== '')
{
if ($suffix = Kohana::config('core.url_suffix') AND strpos(Router::$current_uri, $suffix) !== FALSE)
diff --git a/system/libraries/drivers/Database/Mssql.php b/system/libraries/drivers/Database/Mssql.php
index 6947679a..8b5ed50b 100644
--- a/system/libraries/drivers/Database/Mssql.php
+++ b/system/libraries/drivers/Database/Mssql.php
@@ -298,7 +298,7 @@ class Database_Mssql_Driver extends Database_Driver
public function field_data($table)
{
- $query = $this->query('SHOW COLUMNS FROM '.$this->escape_table($table), $this->link);
+ $query = $this->query("SELECT COLUMN_NAME AS Field, DATA_TYPE as Type FROM INFORMATION_SCHEMA.Columns WHERE TABLE_NAME = '".$this->escape_table($table)."'", $this->link);
return $query->result_array(TRUE);
}