diff options
author | Kevin Chabowski <kevin@kch42.de> | 2012-01-17 01:00:03 +0100 |
---|---|---|
committer | Kevin Chabowski <kevin@kch42.de> | 2012-01-17 01:00:03 +0100 |
commit | 7b110db43af6992182efd8837d877a9d5d65595b (patch) | |
tree | b5f17b53e9603074cce4067769612767bc67caaf | |
parent | 6634d0daf32d26466eae1c9c41209ea75d3096c9 (diff) | |
download | ratatoeskr-cms-7b110db43af6992182efd8837d877a9d5d65595b.tar.gz ratatoeskr-cms-7b110db43af6992182efd8837d877a9d5d65595b.tar.bz2 ratatoeskr-cms-7b110db43af6992182efd8837d877a9d5d65595b.zip |
Fixed a bug in the article editor.
If an article had content only in a language that is not the user's
language, Ratatöskr had crashed.
-rw-r--r-- | ratatoeskr/backend.php | 8 |
1 files changed, 8 insertions, 0 deletions
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", |