Compare commits

...
Sign in to create a new pull request.

5 commits

Author SHA1 Message Date
Josh Sherman
b82b04b121 Disabled token logic
Causing a bunch of shit in scenarios where you want to unauth / reauth a user as the cookie isn't immediately available. Should resolve all of the "You are not properly authenticated" errors we see.
2015-09-12 11:47:08 -04:00
Joshua Sherman
0c3b239417 Updated preg_match to preg_replace_callback
Was throwing a deprecation error, figured it's worth fixing.
2014-01-22 12:31:57 -05:00
Joshua Sherman
d8e6c43868 Added sanity check for loggable_query variable 2014-01-22 12:23:56 -05:00
Joshua Sherman
ed90ee3501 Fixed issue with profilers always being to true 2014-01-22 11:56:17 -05:00
Joshua Sherman
8752540f31 Fixed the case sensitivity issue on this branch.
Just a bug fix, happened months ago but I deleted the branch.
2014-01-17 10:50:59 -05:00
5 changed files with 16 additions and 16 deletions

View file

@ -171,19 +171,10 @@ class Config extends Object
// Defaults profiler to true if it doesn't match an option exactly
if (isset($this->data['pickles']['profiler']))
{
if ($this->data['pickles']['profiler'] !== true)
// If we have an array convert to a string
if (is_array($this->data['pickles']['profiler']))
{
// If we have an array convert to a string
if (is_array($this->data['pickles']['profiler']))
{
$this->data['pickles']['profiler'] = implode(',', $this->data['pickles']['profiler']);
}
// Checks that one of our known values exists, if not, force true
if (preg_match('/(objects|timers|queries|explains)/', $this->data['pickles']['profiler'] == false))
{
$this->data['pickles']['profiler'] = true;
}
$this->data['pickles']['profiler'] = implode(',', $this->data['pickles']['profiler']);
}
}
else

View file

@ -487,7 +487,14 @@ class Controller extends Object
// Scrubs class names with hyphens
if (strpos($module_class, '-') !== false)
{
$module_class = preg_replace('/(-(.{1}))/e', 'strtoupper("$2")', $module_class);
$module_class = preg_replace_callback(
'/(-(.{1}))/',
function ($matches)
{
return strtoupper($matches[2]);
},
$module_class
);
}
return array($module_class, $module_filename, $template_basename, $css_class, $js_basename);

View file

@ -227,7 +227,7 @@ class Database_PDO_Common extends Database_Common
$end_time = microtime(true);
$duration = $end_time - $start_time;
if ($duration >= 1)
if ($duration >= 1 && isset($loggable_query))
{
Log::slowQuery($duration . ' seconds: ' . $loggable_query);
}

View file

@ -255,12 +255,14 @@ class Security
if (self::checkSession() == true && isset($_SESSION['__pickles']['security']['user_id']))
{
// Checks the session against the cookie
/*
if (isset($_SESSION['__pickles']['security']['token'], $_COOKIE['pickles_security_token'])
&& $_SESSION['__pickles']['security']['token'] != $_COOKIE['pickles_security_token'])
{
Security::logout();
}
elseif (isset($_SESSION['__pickles']['security']['level']) && $_SESSION['__pickles']['security']['level'] != null)
else*/
if (isset($_SESSION['__pickles']['security']['level']) && $_SESSION['__pickles']['security']['level'] != null)
{
return $_SESSION['__pickles']['security']['level'];
}

View file

@ -140,7 +140,7 @@ function __autoload($class)
if ($class == 'AYAH')
{
$loaded = require_once PICKLES_VENDOR_PATH . '/ayah/' . $filename;
$loaded = require_once PICKLES_VENDOR_PATH . '/ayah/' . strtolower($filename);
}
else
{