Index: trunk/extensions/Categorize/Categorize.hooks.php |
— | — | @@ -40,7 +40,7 @@ |
41 | 41 | |
42 | 42 | #ADD EXISTING CATEGORIES TO INPUT BOX |
43 | 43 | $arrExistingCats = array(); |
44 | | - $arrExistingCats = $m_pageCats; |
| 44 | + $arrExistingCats = array_unique($m_pageCats); |
45 | 45 | #ADD JAVASCRIPT - use document.write so it is not presented if javascript is disabled. |
46 | 46 | $m_pageObj->$m_place .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"$wgScriptPath/extensions/Categorize/Categorize.css\" /> |
47 | 47 | \n"; # provisoire |
— | — | @@ -109,8 +109,7 @@ |
110 | 110 | #CHECK IF USER HAS SELECTED ANY CATEGORIES |
111 | 111 | if(strlen($strSelectedCats)>1){ |
112 | 112 | $arrSelectedCats = array(); |
113 | | - $arrSelectedCats = explode(";",$_POST['txtSelectedCategories2']); |
114 | | - # !!!!!!!!!!!!!!!! TODO dédoublonner les catégories ICI !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 113 | + $arrSelectedCats = array_unique(explode(";",$_POST['txtSelectedCategories2'])); |
115 | 114 | foreach( $arrSelectedCats as $m_cat ) { |
116 | 115 | if(strlen($m_cat)>0){ |
117 | 116 | $m_text .= "\n[[$m_catString:" . mysql_escape_string(trim($m_cat)) . "]]"; |