diff options
author | matt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2008-11-27 19:01:49 +0300 |
---|---|---|
committer | matt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2008-11-27 19:01:49 +0300 |
commit | f62e9c688beee548636e62787b300e20e46a5197 (patch) | |
tree | 635e9db0531c7fca53662d7b228faefc306fac28 /core | |
parent | d1226a1f670469aa0b1c3c023c667d24830a97bc (diff) |
- 40 min profiling session, a few optimizations and fixing options autoload bug
Diffstat (limited to 'core')
-rw-r--r-- | core/Common.php | 3 | ||||
-rw-r--r-- | core/Option.php | 2 | ||||
-rw-r--r-- | core/PluginsManager.php | 9 | ||||
-rw-r--r-- | core/ViewDataTable.php | 1 |
4 files changed, 4 insertions, 11 deletions
diff --git a/core/Common.php b/core/Common.php index 4c188e9595..2cca73ce91 100644 --- a/core/Common.php +++ b/core/Common.php @@ -157,8 +157,9 @@ class Piwik_Common */ static public function isValidFilename($filename) { - return (false !== ereg("(^[a-zA-Z0-9]+([a-zA-Z\_0-9\.-]*))$" , $filename)); + return (0 !== preg_match("/(^[a-zA-Z0-9]+([a-zA-Z\_0-9\.-]*))$/" , $filename)); } + /** * Returns true if the string passed may be a URL. * We don't need a precise test here because the value comes from the website diff --git a/core/Option.php b/core/Option.php index 95483998c1..f049dcebcf 100644 --- a/core/Option.php +++ b/core/Option.php @@ -63,7 +63,7 @@ class Piwik_Option } catch(Exception $e) { // this would fail for users who upgraded between 0.2.10 and 0.2.13 where option table didn't have the autoload field yet } - foreach($this->all as $option) + foreach($all as $option) { $this->all[$option['option_name']] = $option['option_value']; } diff --git a/core/PluginsManager.php b/core/PluginsManager.php index 09dcc6571f..60c4f42f7a 100644 --- a/core/PluginsManager.php +++ b/core/PluginsManager.php @@ -262,15 +262,6 @@ class Piwik_PluginsManager $path = 'plugins/' . $pluginFileName; - // case Tracker, we don't throw the exception, we don't want to add the Zend overhead - if(class_exists('Zend_Loader') - && !Zend_Loader::isReadable($path)) - { - throw new Exception("<b>The plugin file {$path} couldn't be found. </b><br> - If you are updating from a 0.2.x version, please <a target=_blank href='http://piwik.org/faq/update/#faq_6'>read the FAQ</a>!<br> - Found in your config/config.ini.php file:<br><code>[Plugins]</code><br><code>Plugins[] = $pluginName;</code>"); - } - require_once $path; if(!class_exists($pluginClassName)) diff --git a/core/ViewDataTable.php b/core/ViewDataTable.php index 224e627e60..3e5c78aa0d 100644 --- a/core/ViewDataTable.php +++ b/core/ViewDataTable.php @@ -10,6 +10,7 @@ */ require_once "API/Request.php"; +require_once "View.php"; /** * This class is used to load (from the API) and customize the output of a given DataTable. |