Browse Source

[svn r21590] to edit, first select one page

Juan Carlos Raña 15 years ago
parent
commit
57d367790b
1 changed files with 8 additions and 1 deletions
  1. 8 1
      main/wiki/index.php

+ 8 - 1
main/wiki/index.php

@@ -1174,7 +1174,14 @@ if ($_GET['action']=='edit')
 	$result=api_sql_query($sql,__LINE__,__FILE__);
 	$row=Database::fetch_array($result); // we do not need a while loop since we are always displaying the last version				
 
-	if ($row['content']=='' AND $row['title']=='' AND $page=='index')
+	
+	
+	if ($row['content']=='' AND $row['title']=='' AND $page=='')
+	{
+		Display::display_error_message(get_lang('FirstSelectOnepage'));
+		exit;
+	}
+	elseif ($row['content']=='' AND $row['title']=='' AND $page=='index')
 	{
 		$content=sprintf(get_lang('DefaultContent'),api_get_path(WEB_IMG_PATH));
 		$title=get_lang('DefaultTitle');