public
Description: The ultra-lightweight ultra-flexible blogging engine with a fetish for birds and misspellings.
Homepage: http://chyrp.net/
Clone URL: git://github.com/vito/chyrp.git
Click here to lend your support to: chyrp and make a donation at www.pledgie.com !
* If a Route call is successful, the original Controller method will be ignored.

* Fixed a rogue = instead of == in Trigger.php.
* Added a "user_registered" trigger that passes the new user as the arg.
vito (author)
Tue Nov 18 12:41:57 -0800 2008
commit  7e8768b454fb3d5cf8cda1813524c80002b3584c
tree    761bf8b8d0a8a059522fd50ee294971ef477e071
parent  2ff3d3bcccd006579e6ad18d584f726ec20f3099
...
95
96
97
98
 
99
100
101
...
95
96
97
 
98
99
100
101
0
@@ -95,7 +95,7 @@
0
                 else
0
                     $call = false;
0
 
0
-                if (method_exists($this->controller, $method))
0
+                if ($call === false and method_exists($this->controller, $method))
0
                     $response = call_user_func_array(array($this->controller, $method), $args);
0
                 else
0
                     $response = false;
...
40
41
42
43
 
44
45
46
...
40
41
42
 
43
44
45
46
0
@@ -40,7 +40,7 @@
0
                     $args = func_get_args();
0
                     $args[0] = $call;
0
                     if ($index + 1 == count($name))
0
-                        return $return = $this->exists($call) ? call_user_func_array(array($this, "call"), $args) : $return ;
0
+                        return $return == $this->exists($call) ? call_user_func_array(array($this, "call"), $args) : $return ;
0
                     else
0
                         $return = $this->exists($call) ? call_user_func_array(array($this, "call"), $args) : $return ;
0
                 }
...
479
480
481
482
 
 
 
483
484
485
...
479
480
481
 
482
483
484
485
486
487
0
@@ -479,7 +479,9 @@
0
                     Flash::warning(__("Invalid e-mail address."));
0
 
0
                 if (!Flash::exists("warning")) {
0
-                    User::add($_POST['login'], $_POST['password1'], $_POST['email']);
0
+                    $user = User::add($_POST['login'], $_POST['password1'], $_POST['email']);
0
+
0
+                    Trigger::current()->call("user_registered", $user);
0
 
0
                     $_SESSION['login'] = $_POST['login'];
0
                     $_SESSION['password'] = md5($_POST['password1']);

Comments