Annotation of /mambo/branches/4.6/administrator/components/com_menus/content_archive_category/content_archive_category.class.php
Parent Directory
|
Revision Log
Revision 1756 - (view) (download)
| 1 : | root | 1 | <?php |
| 2 : | /** | ||
| 3 : | elpie | 964 | * @package Mambo |
| 4 : | root | 1 | * @subpackage Menus |
| 5 : | elpie | 1756 | * @author Mambo Foundation Inc see README.php |
| 6 : | * @copyright (C) 2000 - 2009 Mambo Foundation Inc. | ||
| 7 : | * See COPYRIGHT.php for copyright notices and details. | ||
| 8 : | * @license GNU/GPL Version 2, see LICENSE.php | ||
| 9 : | * | ||
| 10 : | * Redistributions of files must retain the above copyright notice. | ||
| 11 : | * | ||
| 12 : | * Mambo is free software; you can redistribute it and/or | ||
| 13 : | * modify it under the terms of the GNU General Public License | ||
| 14 : | * as published by the Free Software Foundation; version 2 of the License. | ||
| 15 : | */ | ||
| 16 : | root | 1 | |
| 17 : | /** ensure this file is being included by a parent file */ | ||
| 18 : | defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); | ||
| 19 : | |||
| 20 : | class content_archive_category_menu { | ||
| 21 : | /** | ||
| 22 : | * @param database A database connector object | ||
| 23 : | * @param integer The unique id of the category to edit (0 if new) | ||
| 24 : | */ | ||
| 25 : | function editCategory( $uid, $menutype, $option ) { | ||
| 26 : | global $database, $my, $mainframe; | ||
| 27 : | global $mosConfig_absolute_path; | ||
| 28 : | |||
| 29 : | $menu = new mosMenu( $database ); | ||
| 30 : | $menu->load( $uid ); | ||
| 31 : | |||
| 32 : | // fail if checked out not by 'me' | ||
| 33 : | if ($menu->checked_out && $menu->checked_out <> $my->id) { | ||
| 34 : | csouza | 165 | echo "<script>alert('".sprintf(T_('The module % is currently being edited by another administrator'), $menu->title)."'); document.location.href='index2.php?option=$option'</script>\n"; |
| 35 : | root | 1 | exit(0); |
| 36 : | } | ||
| 37 : | |||
| 38 : | if ($uid) { | ||
| 39 : | $menu->checkout( $my->id ); | ||
| 40 : | } else { | ||
| 41 : | $menu->type = 'content_archive_category'; | ||
| 42 : | $menu->menutype = $menutype; | ||
| 43 : | $menu->ordering = 9999; | ||
| 44 : | $menu->parent = intval( mosGetParam( $_POST, 'parent', 0 ) ); | ||
| 45 : | $menu->published = 1; | ||
| 46 : | } | ||
| 47 : | |||
| 48 : | // build the html select list for category | ||
| 49 : | $lists['componentid'] = mosAdminMenus::Category( $menu, $uid ); | ||
| 50 : | |||
| 51 : | // build the html select list for ordering | ||
| 52 : | $lists['ordering'] = mosAdminMenus::Ordering( $menu, $uid ); | ||
| 53 : | // build the html select list for the group access | ||
| 54 : | $lists['access'] = mosAdminMenus::Access( $menu ); | ||
| 55 : | // build the html select list for paraent item | ||
| 56 : | $lists['parent'] = mosAdminMenus::Parent( $menu ); | ||
| 57 : | // build published button option | ||
| 58 : | $lists['published'] = mosAdminMenus::Published( $menu ); | ||
| 59 : | // build the url link output | ||
| 60 : | $lists['link'] = mosAdminMenus::Link( $menu, $uid ); | ||
| 61 : | |||
| 62 : | // get params definitions | ||
| 63 : | csouza | 138 | $params =& new mosAdminParameters( $menu->params, $mainframe->getPath( 'menu_xml', $menu->type ), 'menu' ); |
| 64 : | root | 1 | |
| 65 : | content_archive_category_menu_html::editCategory( $menu, $lists, $params, $option ); | ||
| 66 : | } | ||
| 67 : | } | ||
| 68 : | csouza | 138 | ?> |
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |
Web Hosting provided by Network Redux.

