Source for file wrapper.class.php
Documentation is available at wrapper.class.php
* @copyright Refer to copyright.php
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @author Mambo Foundation Inc see README.php
/** ensure this file is being included by a parent file */
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
function edit( &$uid, $menutype, $option ) {
global $database, $my, $mainframe;
global $mosConfig_absolute_path;
// fail if checked out not by 'me'
if ($menu->checked_out &&
$menu->checked_out <>
$my->id) {
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";
$menu->checkout( $my->id );
$menu->menutype =
$menutype;
$menu->link =
'index.php?option=com_wrapper';
// build the html select list for ordering
// build the html select list for the group access
// build the html select list for paraent item
// build published button option
// build the url link output
// get params definitions
$params =
& new mosAdminParameters( $menu->params, $mainframe->getPath( 'menu_xml', $menu->type ), 'menu' );
$menu->url =
$params->def( 'url', '' );
foreach ($params as $k=>
$v) {
if (!$row->bind( $_POST )) {
echo
"<script> alert('".
$row->getError().
"'); window.history.go(-1); </script>\n";
echo
"<script> alert('".
$row->getError().
"'); window.history.go(-1); </script>\n";
echo
"<script> alert('".
$row->getError().
"'); window.history.go(-1); </script>\n";
$row->updateOrder( "menutype='$row->menutype' AND parent='$row->parent'" );
$msg =
'Menu item Saved';
mosRedirect( 'index2.php?option='.
$option .
'&menutype='.
$row->menutype .
'&task=edit&id='.
$row->id, $msg );
mosRedirect( 'index2.php?option='.
$option .
'&menutype='.
$row->menutype, $msg );
Documentation generated on Mon, 05 May 2008 16:24:31 +0400 by phpDocumentor 1.4.0