Я разрабатываю пользовательский компонент joomla 1.5, и он отлично работает локально (wamp server, php 5.3.5), а функции добавления / редактирования и удаления панели инструментов не работают на моей учетной записи хостинга (apache, php 5.2.16)
У меня есть две панели инструментов, когда я нажимаю на вторую панель инструментов, она перенаправляет на первую
, это мой код
controller.php
class GalGallerifficController extends JController
{
/**
* Method to display the view
*
* @access public
*/
/**
* constructor (registers additional tasks to methods)
* @return void
*/
function __construct()
{
parent::__construct();
// Register Extra tasks
$this->registerTask( 'add' , 'edit' );
}
/**
* display the edit form
* @return void
*/
function edit()
{
JRequest::setVar( 'view', 'gallery' );
JRequest::setVar( 'layout', 'form' );
JRequest::setVar('hidemainmenu', 1);
parent::display();
}
/**
* remove record(s)
* @return void
*/
function remove()
{
$model = $this->getModel('gallery');
if(!$model->delete()) {
$msg = JText::_( 'Error: One or More Gallery(s) Could not be Deleted' );
} else {
$msg = JText::_( 'Gallery(s) Deleted' );
}
$this->setRedirect( 'index.php?option=com_galleriffic', $msg );
}
}
ивторой контроллер / galleryitems.php
class GalGallerifficControllerGalleryItems extends JController
{
function __construct()
{
parent::__construct();
// Register Extra tasks
$this->registerTask( 'add' , 'edit' );
}
/**
* display the edit form
* @return void
*/
function edit()
{
JRequest::setVar( 'view', 'galleryitem' );
JRequest::setVar( 'layout', 'form' );
JRequest::setVar('hidemainmenu', 1);
parent::display();
}
/**
* remove record(s)
* @return void
*/
function remove()
{
$model = $this->getModel('gallery');
if(!$model->delete()) {
$msg = JText::_( 'Error: One or More Gallery(s) Could not be Deleted' );
} else {
$msg = JText::_( 'Gallery(s) Deleted' );
}
$this->setRedirect( 'index.php?option=com_galleriffic', $msg );
}
function display()
{
parent::display();
}
}
и представление galleryitems
class GalGallerifficViewGalleryItems extends JView
{
function display($tpl = null)
{
JToolBarHelper::title( JText::_( 'Galleriffic Gallery Items' ), 'generic.png' );
JToolBarHelper::deleteList();
JToolBarHelper::editListX();
JToolBarHelper::addNewX();
// Get data from the model
$items =& $this->get( 'Data');
$this->assignRef( 'items', $items );
parent::display($tpl);
}
}
есть идеи, почему это произошло?
заранее спасибо :))