Changeset 19 in ExiteCMS8
- Timestamp:
- 02/17/11 10:14:59 (15 months ago)
- Location:
- trunk/fuel
- Files:
-
- 2 added
- 7 edited
-
core/classes/config.php (modified) (2 diffs)
-
core/classes/database/exception.php (modified) (1 diff)
-
core/classes/format.php (modified) (3 diffs)
-
core/classes/fuel.php (modified) (2 diffs)
-
core/classes/security.php (modified) (1 diff)
-
core/classes/view.php (modified) (1 diff)
-
core/vendor/htmlawed (added)
-
core/vendor/htmlawed/htmlawed.php (added)
-
packages/oil/classes/generate.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/fuel/core/classes/config.php
r15 r19 94 94 95 95 CONF; 96 $content .= 'return '. var_export($config, true).';';96 $content .= 'return '.str_replace(' ', "\t", var_export($config, true)).';'; 97 97 $content .= <<<CONF 98 98 … … 100 100 /* End of file $file.php */ 101 101 CONF; 102 if ($path = \Fuel::find_file('config', $file, '.php')) 103 { 104 $path = $path[0]; 105 } 106 else 107 { 108 $path = APPPATH.'config'.DS.$file.'.php'; 109 } 102 103 ($path = \Fuel::find_file('config', $file, '.php')) or $path = APPPATH.'config'.DS.$file.'.php'; 104 110 105 $path = pathinfo($path); 111 106 -
trunk/fuel/core/classes/database/exception.php
r18 r19 12 12 namespace Fuel\Core; 13 13 14 class Database_Exception extends Fuel_Exception {}14 class Database_Exception extends \Fuel_Exception {} -
trunk/fuel/core/classes/format.php
r18 r19 84 84 foreach ((array) $this->_data as $key => $value) 85 85 { 86 if (is_object($value) )86 if (is_object($value) or is_array($value)) 87 87 { 88 88 $array[$key] = static::to_array($value); … … 134 134 135 135 // replace anything not alpha numeric 136 $key = preg_replace('/[^a-z_ ]/i', '', $key);136 $key = preg_replace('/[^a-z_\-0-9]/i', '', $key); 137 137 138 138 // if there is another array found recrusively call this function … … 150 150 // add single node. 151 151 $value = htmlspecialchars(html_entity_decode($value, ENT_QUOTES, 'UTF-8'), ENT_QUOTES, "UTF-8"); 152 153 $UsedKeys[] = $key;154 152 155 153 $structure->addChild($key, $value); -
trunk/fuel/core/classes/fuel.php
r18 r19 202 202 * @param string The name of the file 203 203 * @param string The file extension 204 * @param boolean if true return an array of all files found 205 * @param boolean if false do not cache the result 204 206 * @return string The path to the file 205 207 */ 206 public static function find_file($directory, $file, $ext = '.php', $multiple = false )208 public static function find_file($directory, $file, $ext = '.php', $multiple = false, $cache = true) 207 209 { 208 210 $path = $directory.DS.strtolower($file).$ext; … … 236 238 } 237 239 238 static::$path_cache[$path] = $found;240 $cache and static::$path_cache[$path] = $found; 239 241 static::$paths_changed = true; 240 242 -
trunk/fuel/core/classes/security.php
r18 r19 114 114 } 115 115 116 public static function xss_clean($value) 117 { 118 if ( ! is_array($value)) 119 { 120 if ( ! function_exists('htmLawed')) 121 { 122 import('htmlawed/htmlawed', 'vendor'); 123 } 124 125 return htmLawed($value, array('safe' => 1)); 126 } 127 128 foreach ($value as $k => $v) 129 { 130 $value[$k] = static::xss_clean($v); 131 } 132 133 return $value; 134 } 135 116 136 public static function strip_tags($value) 117 137 { -
trunk/fuel/core/classes/view.php
r13 r19 268 268 public function set_filename($file) 269 269 { 270 if (($path = \Fuel::find_file('views', $file )) === false)270 if (($path = \Fuel::find_file('views', $file, '.php', false, false)) === false) 271 271 { 272 272 throw new \View_Exception('The requested view could not be found: '.\Fuel::clean_path($file)); -
trunk/fuel/packages/oil/classes/generate.php
r18 r19 134 134 if ( ! file_exists($app_template = APPPATH . 'views/template.php')) 135 135 { 136 copy(PKGPATH . 'oil/views/ template.php', $app_template);136 copy(PKGPATH . 'oil/views/default/template.php', $app_template); 137 137 chmod($app_template, 0666); 138 138 }
Note: See TracChangeset
for help on using the changeset viewer.
