| [ Index ] |
|
Code source de LifeType 1.2.4 |
1 <?php 2 3 lt_include( PLOG_CLASS_PATH."class/view/blogview.class.php" ); 4 lt_include( PLOG_CLASS_PATH.'class/data/timestamp.class.php' ); 5 6 define( "ERROR_TEMPLATE", "error" ); 7 8 /** 9 * \ingroup View 10 * 11 * The ErrorView class takes care of showing error messages. Use this view whenever you need to 12 * show an error message in the public side of the blog. 13 */ 14 class ErrorView extends BlogView 15 { 16 17 function ErrorView( $blogInfo, $message = null ) 18 { 19 $this->BlogView( $blogInfo, ERROR_TEMPLATE, SMARTY_VIEW_CACHE_DISABLED ); 20 21 $this->_message = $message; 22 } 23 24 /** 25 * overriden from View::setErrorMessage, it simply sets the "message" 26 * variable to the error message that we're being given 27 * 28 * @param message the new error message 29 * @see View::setErrorMessage() 30 * @return Always true 31 */ 32 function setErrorMessage( $message ) 33 { 34 $this->setValue( "message", $message ); 35 36 return( parent::setErrorMessage( $message )); 37 } 38 39 /** 40 * Provides the page title 41 */ 42 function getPageTitle() 43 { 44 return( $this->_blogInfo->getBlog()." | ".$this->_locale->tr("error")); 45 } 46 47 /** 48 * renders the error message 49 */ 50 function render() 51 { 52 if(!empty($this->_message)) 53 $this->setValue( "message", $this->_message ); 54 55 $this->setValue( 'now', new Timestamp()); 56 57 parent::render(); 58 } 59 } 60 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
| Généré le : Mon Nov 26 21:04:15 2007 | par Balluche grâce à PHPXref 0.7 |
|