X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fnewapplication.php;h=ca5d902a268d1f7bd2ab8d09c2546b15aa17ce67;hb=b1cc12af2ce66d1066c7543c9797b1fba9faf88f;hp=eb13593536f67a0b18fe04f19243c0e79a5c6856;hpb=9573f725c12e291e4bd3e3156557e41a10753d76;p=quix0rs-gnu-social.git diff --git a/actions/newapplication.php b/actions/newapplication.php index eb13593536..ca5d902a26 100644 --- a/actions/newapplication.php +++ b/actions/newapplication.php @@ -22,7 +22,7 @@ * @category Applications * @package StatusNet * @author Zach Copley - * @copyright 2008-2009 StatusNet, Inc. + * @copyright 2008-2011 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ @@ -109,6 +109,7 @@ class NewApplicationAction extends OwnerDesignAction // CSRF protection $token = $this->trimmed('token'); if (!$token || $token != common_session_token()) { + // TRANS: Client error displayed when the session token does not match or is not given. $this->clientError(_('There was a problem with your session token.')); return; } @@ -290,7 +291,14 @@ class NewApplicationAction extends OwnerDesignAction $app->query('ROLLBACK'); } - $app->uploadLogo(); + try { + $app->uploadLogo(); + } catch (Exception $e) { + $app->query('ROLLBACK'); + // TRANS: Form validation error on New application page when providing an invalid image upload. + $this->showForm(_('Invalid image.')); + return; + } $app->query('COMMIT');