From 7b110db43af6992182efd8837d877a9d5d65595b Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Tue, 17 Jan 2012 01:00:03 +0100 Subject: Fixed a bug in the article editor. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If an article had content only in a language that is not the user's language, Ratatöskr had crashed. --- ratatoeskr/backend.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ratatoeskr/backend.php') diff --git a/ratatoeskr/backend.php b/ratatoeskr/backend.php index 78ef83c..983fe2b 100644 --- a/ratatoeskr/backend.php +++ b/ratatoeskr/backend.php @@ -299,6 +299,14 @@ $backend_subactions = url_action_subactions(array( } } + if(!isset($article->title[$editlang])) + { + $langs_available = array(); + foreach($article->title as $lang => $_) + $langs_available[] = $lang; + $editlang = $langs_available[0]; + } + foreach(array( "urlname" => "urlname", "section" => "article_section", -- cgit v1.2.3-70-g09d2