[ Index ]
 

Code source de Joomla 1.0.13

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/administrator/components/com_menus/separator/ -> separator.class.php (source)

   1  <?php
   2  /**
   3  * @version $Id: separator.class.php 4544 2006-08-15 13:49:12Z predator $
   4  * @package Joomla
   5  * @subpackage Menus
   6  * @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
   7  * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
   8  * Joomla! is free software. This version may have been modified pursuant
   9  * to the GNU General Public License, and as distributed it includes or
  10  * is derivative of works licensed under the GNU General Public License or
  11  * other free or open source software licenses.
  12  * See COPYRIGHT.php for copyright notices and details.
  13  */
  14  
  15  // no direct access
  16  defined( '_VALID_MOS' ) or die( 'Restricted access' );
  17  
  18  /**
  19  * @package Joomla
  20  * @subpackage Menus
  21  */
  22  class separator_menu {
  23  
  24      /**
  25      * @param database A database connector object
  26      * @param integer The unique id of the category to edit (0 if new)
  27      */
  28  	function edit( $uid, $menutype, $option ) {
  29          global $database, $my, $mainframe;
  30  
  31          $menu = new mosMenu( $database );
  32          $menu->load( (int)$uid );
  33  
  34          // fail if checked out not by 'me'
  35          if ($menu->checked_out && $menu->checked_out != $my->id) {
  36              mosErrorAlert( "The module ".$menu->title." is currently being edited by another administrator" );
  37          }
  38  
  39          if ($uid) {
  40              // do stuff for existing item
  41              $menu->checkout( $my->id );
  42  
  43          } else {
  44              // do stuff for new item
  45              $menu->type         = 'separator';
  46              $menu->menutype     = $menutype;
  47              $menu->browserNav     = 0;
  48              $menu->ordering     = 9999;
  49              $menu->parent         = intval( mosGetParam( $_POST, 'parent', 0 ) );
  50              $menu->published     = 1;
  51          }
  52  
  53          if ( empty( $menu->name ) ) {
  54              $menu->name = '- - - - - - -';
  55          }
  56  
  57          // build the html select list for ordering
  58          $lists['ordering']         = mosAdminMenus::Ordering( $menu, $uid );
  59          // build the html select list for the group access
  60          $lists['access']         = mosAdminMenus::Access( $menu );
  61          // build the html select list for paraent item
  62          $lists['parent']         = mosAdminMenus::Parent( $menu );
  63          // build published button option
  64          $lists['published']     = mosAdminMenus::Published( $menu );
  65  
  66          // get params definitions
  67          $params = new mosParameters( $menu->params, $mainframe->getPath( 'menu_xml', $menu->type ), 'menu' );
  68  
  69          separator_menu_html::edit( $menu, $lists, $params, $option );
  70      }
  71  }
  72  ?>


Généré le : Wed Nov 21 14:43:32 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics