]> git.mjollnir.org Git - moodle.git/commitdiff
fixed undefined notice
authorskodak <skodak>
Sun, 16 Sep 2007 18:54:11 +0000 (18:54 +0000)
committerskodak <skodak>
Sun, 16 Sep 2007 18:54:11 +0000 (18:54 +0000)
tag/manage.php

index e40b58c60256b4719b950196f3f4f01e74abe708..c91a5c6f8fde016c8344ff53704aea82eb0f0ae4 100644 (file)
@@ -29,6 +29,8 @@ print_header_simple(get_string('managetags', 'tag'), '', $navigation);
 $notice = tag_name_from_string(implode($tagschecked, ', '));
 $notice = str_replace(',', ', ', $notice);
 
+$err_notice = '';
+
 switch($action) {
 
     case 'delete':
@@ -68,7 +70,6 @@ switch($action) {
         $existing_tags = tags_id( $normalized_new_names_csv );
         
         //notice to warn that names already exist
-        $err_notice = '';
         foreach ($existing_tags as $name => $tag){
             $err_notice .= $name . ', ';
         }
@@ -96,8 +97,12 @@ switch($action) {
 
 echo '<br/>';
 
-notify($err_notice, 'red');
-notify($notice , 'green');
+if ($err_notice) {
+    notify($err_notice, 'red');
+}
+if ($notice) {
+    notify($notice , 'green');
+}
 
 print_tag_management_list();