diff options
author | raylu <raylu@mixpanel.com> | 2011-07-02 17:02:07 -0700 |
---|---|---|
committer | raylu <raylu@mixpanel.com> | 2011-07-02 17:02:07 -0700 |
commit | 05a2b26d9038752a40348a3f226e44710833c49b (patch) | |
tree | 9bc3e49ac2e84b33ca5ff6e44eb7e5f2c02d13bf /controllers | |
parent | 83483a1826d1d05e2f9733746f35fef1939b8c0a (diff) | |
download | otakuhub-05a2b26d9038752a40348a3f226e44710833c49b.tar.xz |
pull in dev branch changes
not pulled: swiftmailer, gzip
Diffstat (limited to 'controllers')
-rw-r--r-- | controllers/AnimelistController.php | 9 | ||||
-rw-r--r-- | controllers/ImportController.php | 13 | ||||
-rw-r--r-- | controllers/MangalistController.php | 11 | ||||
-rw-r--r-- | controllers/UsersController.php | 26 |
4 files changed, 30 insertions, 29 deletions
diff --git a/controllers/AnimelistController.php b/controllers/AnimelistController.php index add8fb7..47e5de2 100644 --- a/controllers/AnimelistController.php +++ b/controllers/AnimelistController.php @@ -94,17 +94,10 @@ class AnimeListController extends \lithium\action\Controller { $entry->my_tags = explode(',', $this->request->data['tags']); unset($this->request->data['tags']); } - - /* - var_dump($entry->_validates); - //If the entry is valid - if (Validator::check($entry->data(),$entry->_validates, array('skipEmpty' => true))) { - //Store it, :TODO: make sure this passes at some point, silent failures suck - $entry->add($username); - */ if($entry->add($username)) { + //Redirect the user to their anime list return $this->redirect("/animelist/view/$username"); } diff --git a/controllers/ImportController.php b/controllers/ImportController.php new file mode 100644 index 0000000..af917fb --- /dev/null +++ b/controllers/ImportController.php @@ -0,0 +1,13 @@ +<?php + +namespace app\controllers; + +class ImportController extends \lithium\action\Controller { + public function index($source, $type = 'all') { + if ($this->request->data) { + $user = Auth::check('default'); + $user = Users::find($user->id); + ContentList::ImportAnimeXML($user, $this->request->data['file']); + } + } +}
\ No newline at end of file diff --git a/controllers/MangalistController.php b/controllers/MangalistController.php new file mode 100644 index 0000000..1f2bec6 --- /dev/null +++ b/controllers/MangalistController.php @@ -0,0 +1,11 @@ +<?php + +namespace app\controllers; + +class MangalistController extends \lithium\action\Controller { + public function view($username) + { + $user = User::first('conditions' => compact('username')); + + } +}
\ No newline at end of file diff --git a/controllers/UsersController.php b/controllers/UsersController.php index 3991738..d1b3193 100644 --- a/controllers/UsersController.php +++ b/controllers/UsersController.php @@ -11,7 +11,7 @@ use lithium\security\Auth; use lithium\util\String; use \MongoDate; use li3_flash_message\extensions\storage\FlashMessage; -use app\libraries\openID\LightOpenID; +use lithium\template\helper\Html; class UsersController extends \lithium\action\Controller { public $secret = "marshmellows"; //I don't know why either? @@ -223,21 +223,6 @@ class UsersController extends \lithium\action\Controller { } - public function openid() - { - if ($this->request->data) - { - if (!empty($this->request->query)) - { - var_dump($this->request->query); - } - else - { - $openid = new LightOpenID; - echo $openid->validates(); - } - } - } public function signup() { @@ -287,15 +272,14 @@ class UsersController extends \lithium\action\Controller { } } - public function login($location = null, $args = null) - { - //Put in a check to make sure the user has confirmed their account - //The check should probably happen below after the auth check. - /* + /* If the user is valid, but not confirmed, tell the user they haven't confirmed, offer to resend the confirmation email or changed their email address. */ + public function login($location = null, $args = null) + { + if (!empty($this->request->data)) { $user = Auth::check('default', $this->request); if ($user) |