Permalink
Browse files

fixes

  • Loading branch information...
1 parent a48d49b commit c16bdc036cfc547ba756f93ac404b84654e6923d @romaninsh romaninsh committed Feb 11, 2013
Showing with 15 additions and 15 deletions.
  1. +1 −1 VERSION
  2. +11 −11 lib/AbstractObject.php
  3. +1 −1 lib/ApiFrontend.php
  4. +2 −2 lib/Auth/Basic.php
View
@@ -1 +1 @@
-4.2.4
+4.2.5
View
@@ -413,23 +413,23 @@ function memorize($key, $value)
return $_SESSION['o'][$this->name][$key] = $value;
}
/**
- * Similar to memorize, but will associate first non-nul argument
+ * Similar to memorize, but if value for key exist, will return Iterator
+ * instead.
*
- * @param string $key Key for the data
- * @param mixed $value1 Possible value for data
- * @param mixed $value2 Possible value for data
- * @param mixed $value3 Possible value for data
+ * @param string $key Data Key
+ * @param mixed $default Default value
*
* @return AbstractObject $this
*/
- function learn($key, $value1 = null, $value2 = null, $value3 = null)
+ function learn($key, $default = null)
{
- if (isset ($value1)) {
- return $this->memorize($key, $value1);
- } elseif (isset ($value2)) {
- return $this->memorize($key, $value2);
+ $this->api->initializeSession(false);
+ if (!isset ($_SESSION['o'][$this->name][$key])
+ || is_null($_SESSION['o'][$this->name][$key])
+ ) {
+ return $this->memorize($key, $default);
} else {
- return $this->memorize($key, $value3);
+ return $_SESSION['o'][$this->name][$key];
}
}
/**
View
@@ -39,7 +39,7 @@ function initLayout(){
}
function routePages($prefix,$ns=null){
if(!$ns)$ns=$prefix;
- $this->namespace_routes[$prefix]=$ns;
+ $this->namespace_routes[$prefix]=str_replace('/','\\',$ns);
}
function layout_Content(){
// required class prefix depends on the content_type
View
@@ -277,10 +277,10 @@ function verifyCredentials($user, $password)
// If password field is not defined in the model for security
// reasons, let's add it for authentication purpose.
- $pasword_existed=true;
+ $password_existed=true;
if (!$this->model->hasElement($this->password_field)) {
$this->model->addField($this->password_field)->type('password');
- $pasword_existed=false;
+ $password_existed=false;
}
// Attempt to load user data by username. If not found, return

0 comments on commit c16bdc0

Please sign in to comment.