summaryrefslogtreecommitdiff
path: root/modules/gallery/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/libraries')
-rw-r--r--modules/gallery/libraries/MY_Database.php2
-rw-r--r--modules/gallery/libraries/MY_Kohana_Exception.php6
2 files changed, 6 insertions, 2 deletions
diff --git a/modules/gallery/libraries/MY_Database.php b/modules/gallery/libraries/MY_Database.php
index fb54bfcd..4fbd62fd 100644
--- a/modules/gallery/libraries/MY_Database.php
+++ b/modules/gallery/libraries/MY_Database.php
@@ -58,7 +58,7 @@ abstract class Database extends Database_Core {
$open_brace = strpos($sql, "{") + 1;
$close_brace = strpos($sql, "}", $open_brace);
$name = substr($sql, $open_brace, $close_brace - $open_brace);
- $this->_table_names["{{$name}}"] = "{$prefix}$name";
+ $this->_table_names["{{$name}}"] = "`{$prefix}$name`";
} else if (strpos($sql, "RENAME TABLE") === 0) {
// Renaming a table; add it to the table cache.
// You must use the form "TO {new_table_name}" exactly for this to work.
diff --git a/modules/gallery/libraries/MY_Kohana_Exception.php b/modules/gallery/libraries/MY_Kohana_Exception.php
index dd04b25f..0c07ea5e 100644
--- a/modules/gallery/libraries/MY_Kohana_Exception.php
+++ b/modules/gallery/libraries/MY_Kohana_Exception.php
@@ -23,7 +23,7 @@ class Kohana_Exception extends Kohana_Exception_Core {
*/
public static function text($e) {
if ($e instanceof Kohana_404_Exception) {
- return "File not found: " . Router::$complete_uri;
+ return "File not found: " . rawurlencode(Router::$complete_uri);
} else {
return sprintf(
"%s [ %s ]: %s\n%s [ %s ]\n%s",
@@ -94,4 +94,8 @@ class Kohana_Exception extends Kohana_Exception_Core {
}
return $result;
}
+
+ public static function debug_path($file) {
+ return html::clean(parent::debug_path($file));
+ }
} \ No newline at end of file