From: <fl...@bi...> - 2003-01-10 00:29:37
|
Hi My friend and we had both problems to submit articles. We found out, that an error occurs if you press save in submit articles, as long as you haven't configured any topics. After hitting save, we get an emty page( Uagh). I added a chunk of code that displays a message using error.tpl. Here it is: diff -u -d tiki-edit_submission.php tiki-edit_submission.phpneu --- tiki-edit_submission.php 2003-01-02 00:15:05.000000000 +0100 +++ tiki-edit_submission.phpneu 2003-01-10 08:21:23.000000000 +0100 @@ -292,6 +292,12 @@ // Armar un select con los topics $topics = $tikilib->list_topics(); +if (sizeof($topics) == 0) { + $smarty->assign('msg',tra("You cannot submit articles as long as no topics are configured")); + $smarty->display("styles/$style_base/error.tpl"); + die; +} + $smarty->assign_by_ref('topics',$topics); if($feature_cms_templates == 'y' && $tiki_p_use_content_templates == 'y') { @@ -305,4 +311,4 @@ $smarty->assign('mid','tiki-edit_submission.tpl'); $smarty->assign('show_page_bar','n'); $smarty->display("styles/$style_base/tiki.tpl"); -?> \ No newline at end of file +?> Flo |