Archived
1
0
Fork 0

Error page update mostly play

This commit is contained in:
Fredric N 2010-08-23 23:01:48 +02:00
parent b5d574ffd3
commit 0f0ee9db2b
7 changed files with 52 additions and 14 deletions

View file

@ -9,17 +9,24 @@
<pages>
<blog>
<label>u:blog</label>
<route>default</route>
<module>blog</module>
<controller>index</controller>
<action>index</action>
<module>blog</module>
<route>default</route>
</blog>
<portfolio>
<label>u:portfolio</label>
<route>default</route>
<moudule>default</moudule>
<controller>portfolio</controller>
<action>index</action>
</portfolio>
<about>
<label>uw:about</label>
<route>default</route>
<module>default</module>
<controller>index</controller>
<action>about</action>
<module>default</module>
<route>default</route>
</about>
</pages>
</start>

View file

@ -10,4 +10,8 @@ LOGIN_TXT = "Fill out your information below to login.<br /><p class="yellow">Th
START_TXT = "Welcome to fiktivkod.org. ...."
ABOUT_TXT = "Fiktiv (fiktivkod.org) is ... that started ..."
BLOG_TXT = "We at fiktivkod use this blog to tell our stories about happy times and maybe not so happy experience ... "
BLOG_TXT = "We at fiktivkod use this blog to tell our stories about happy times and maybe not so happy experience ... "
ERROR_404 = "Oops, something went wrong"
ERROR_TXT_WHAT = "The following went wrong"

View file

@ -10,4 +10,11 @@ LOGIN_TXT = "Ange dina uppgifter nedan för att logga in.<br /><p class="yellow"
START_TXT = "Välkommen till fiktivkod.org. ...."
ABOUT_TXT = "Fiktiv (fiktivkod.org) är ... som startade ..."
BLOG_TXT = "Här på bloggen delar vi med oss av våra erfarenheter och andra dumheter ... "
BLOG_TXT = "Här på bloggen delar vi med oss av våra erfarenheter och andra dumheter ... "
ERROR_404 = "Oops, något blev fel"
ERROR_TXT_WHAT = "Följande har gått fel"
class = klass
function = funktion
line = rad

View file

@ -11,6 +11,11 @@ class AuthController extends Fiktiv_Controller_Action
*/
public function loginAction()
{
// Redirect if user is logged in
if (Zend_Auth::getInstance()->hasIdentity())
$this->_redirect('/');
// Do authentication magic
$form = new Zend_Form();
@ -62,7 +67,8 @@ class AuthController extends Fiktiv_Controller_Action
// Destroy the magic!
$auth = Zend_Auth::getInstance();
$auth->clearIdentity();
if ($auth->hasIdentity())
$auth->clearIdentity();
$this->_redirect('/');
}

View file

@ -6,9 +6,9 @@ class ErrorController extends Zend_Controller_Action
{
$this->view->args = $this->_request->getParams();
$error = $this->_request->getParam('error_handler');
$this->view->error = $this->_request->getParam('error_handler');
var_dump($error->exception->getTrace());
}
}

View file

@ -2,5 +2,4 @@
<p><?=$this->translate('LOGIN_TXT') ?></p>
<?=$this->form ?>
<?=$this->form ?>

View file

@ -1,5 +1,20 @@
<?php
<h1><?=$this->translate('ERROR_404') ?></h1>
var_dump($this->args);
<p>
<?=$this->translate('ERROR_TXT_WHAT') ?>: <strong><?=$this->error->exception->getMessage() ?></strong>
</p>
?>
<table>
<tr>
<th><?=$this->translate('u:class') ?></th>
<th><?=$this->translate('u:function') ?></th>
<th><?=$this->translate('u:line') ?></th>
</tr>
<?php foreach ($this->error->exception->getTrace() as $call): ?>
<tr>
<td><?=$call['class'] ?></td>
<td><?=$call['function'] ?></td>
<td><?=$call['line'] ?></td>
</tr>
<?php endforeach; ?>
</table>