I am facing a prob with a couple of my language strings:
after the db save I am using a custom code action for displaying a system msg:
<?php
$app =& JFactory::getApplication();
$url = 'index.php?option=com_chronoforms&chronoform=listhorses&Itemid='. JRequest::getInt('Itemid');
$message = JText::_('SAVED_ENTRY');
if (isset ($_POST['input_submit_14']))
$app->redirect(JRoute::_( $url ), $message );
else $app->redirect(JRoute::_( $url ), false );
?>
the language action contains:
SAVED_ENTRY=Entry successfully saved
on another form that lists all entries the delete logic is like this:
<?php
$database =& JFactory::getDBO();
$app =& JFactory::getApplication();
$uid = JRequest::getVar( 'cf_uid' , '', 'get');
if ($uid) {
$user =& JFactory::getUser();
$cf_user_id = JRequest::getVar( 'cf_user_id' , '', 'get' );
if ( (!$user->authorise('core.admin') AND $cf_user_id = $user->id) OR $user->authorise('core.admin') ) {
$database->setQuery("DELETE FROM #__cf_sometable WHERE cf_uid = '$uid'");
$database->query();
$app->redirect(JRoute::_("index.php?option=com_chronoforms&chronoform=xxx&Itemid=". JRequest::getInt('Itemid')), JText::_('DELETED_ITEM'));
} else {
$app->redirect(JRoute::_("index.php?option=com_chronoforms&chronoform=xxx&Itemid=". JRequest::getInt('Itemid')), JText::_('NOT_AUTH') );
}
}
?>
language action contains:
DELETED_ITEM=Item successfully deleted
NOT_AUTHORIZED=Not authorized.
prob is that the system message doesnt display the value of the constant but the constant itself.
could somebody pls point out to me what I'm doing wrong?
J!2.5 CF 4 RC3.21