From 05a2b26d9038752a40348a3f226e44710833c49b Mon Sep 17 00:00:00 2001 From: raylu Date: Sat, 2 Jul 2011 17:02:07 -0700 Subject: pull in dev branch changes not pulled: swiftmailer, gzip --- controllers/AnimelistController.php | 9 +-------- controllers/ImportController.php | 13 +++++++++++++ controllers/MangalistController.php | 11 +++++++++++ controllers/UsersController.php | 26 +++++--------------------- 4 files changed, 30 insertions(+), 29 deletions(-) create mode 100644 controllers/ImportController.php create mode 100644 controllers/MangalistController.php (limited to 'controllers') 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 @@ +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 @@ + 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) -- cgit v1.2.3