[ Index ]

PHP Cross Reference of Joomla 1.5.26 DE

title

Body

[close]

/components/com_user/views/reset/ -> view.html.php (source)

   1  <?php
   2  /**
   3   * @version        $Id: view.html.php 14401 2010-01-26 14:10:00Z louis $
   4   * @package        Joomla
   5   * @subpackage    User
   6   * @copyright    Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
   7   * @license        GNU/GPL, see LICENSE.php
   8   * Joomla! is free software. This version may have been modified pursuant to the
   9   * GNU General Public License, and as distributed it includes or is derivative
  10   * of works licensed under the GNU General Public License or other free or open
  11   * source software licenses. See COPYRIGHT.php for copyright notices and
  12   * details.
  13   */
  14  
  15  // No direct access
  16  defined('_JEXEC') or die;
  17  
  18  jimport('joomla.application.component.view');
  19  
  20  /**
  21   * HTML View class for the Users component
  22   *
  23   * @package        Joomla
  24   * @subpackage    User
  25   * @since        1.5
  26   */
  27  class UserViewReset extends JView
  28  {
  29      /**
  30       * Registry namespace prefix
  31       *
  32       * @var    string
  33       */
  34      var $_namespace    = 'com_user.reset.';
  35  
  36      /**
  37       * Display function
  38       *
  39       * @since 1.5
  40       */
  41  	function display($tpl = null)
  42      {
  43          jimport('joomla.html.html');
  44  
  45          global $mainframe;
  46  
  47          // Load the form validation behavior
  48          JHTML::_('behavior.formvalidation');
  49  
  50          // Add the tooltip behavior
  51          JHTML::_('behavior.tooltip');
  52  
  53          // Get the layout
  54          $layout    = $this->getLayout();
  55  
  56          if ($layout == 'complete')
  57          {
  58              $id        = $mainframe->getUserState($this->_namespace.'id');
  59              $token    = $mainframe->getUserState($this->_namespace.'token');
  60  
  61              if (is_null($id) || is_null($token))
  62              {
  63                  $mainframe->redirect('index.php?option=com_user&view=reset');
  64              }
  65          }
  66  
  67          // Get the page/component configuration
  68          $params = &$mainframe->getParams();
  69  
  70          $menus    = &JSite::getMenu();
  71          $menu    = $menus->getActive();
  72  
  73          // because the application sets a default page title, we need to get it
  74          // right from the menu item itself
  75          if (is_object( $menu )) {
  76              $menu_params = new JParameter( $menu->params );
  77              if (!$menu_params->get( 'page_title')) {
  78                  $params->set('page_title',    JText::_( 'FORGOT_YOUR_PASSWORD' ));
  79              }
  80          } else {
  81              $params->set('page_title',    JText::_( 'FORGOT_YOUR_PASSWORD' ));
  82          }
  83          $document    = &JFactory::getDocument();
  84          $document->setTitle( $params->get( 'page_title' ) );
  85  
  86          $this->assignRef('params',        $params);
  87  
  88          parent::display($tpl);
  89      }
  90  }


Generated: Wed Mar 28 15:54:07 2012 Cross-referenced by PHPXref 0.7.1