]> git.mjollnir.org Git - moodle.git/commitdiff
feed titles are stored and displayed again - silly bug
authordhawes <dhawes>
Mon, 24 Jan 2005 02:58:19 +0000 (02:58 +0000)
committerdhawes <dhawes>
Mon, 24 Jan 2005 02:58:19 +0000 (02:58 +0000)
blocks/rss_client/block_rss_client_action.php

index 948d6e66c9799282628c26aec88a90c1df27a936..f0bb5abe103ce6ed88af4d12920587c7749f0679 100644 (file)
     optional_variable($rsstype);
     optional_variable($item);
     
+    $straddedit = get_string('block_rss_feeds_add_edit', 'block_rss_client');
+    if ( isadmin() ) {
+        $stradmin = get_string('administration');
+        $strconfiguration = get_string('configuration');
+        $navigation = "<a href=\"$CFG->wwwroot/$CFG->admin/index.php\">$stradmin</a> -> ".
+        "<a href=\"$CFG->wwwroot/$CFG->admin/configure.php\">$strconfiguration</a> -> $straddedit";
+    } else if ($courseid != 'none' && $course = get_record('course', 'id', $courseid) ) {
+        $navigation = "<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> -> $straddedit";
+    } else {
+        $navigation = $straddedit;
+    }
+    
     print_header(get_string('block_rss_feeds_add_edit', 'block_rss_client'), 
                  get_string('block_rss_feeds_add_edit', 'block_rss_client'), 
-                 get_string('block_rss_feeds_add_edit', 'block_rss_client') );
+                 $navigation );
 
     //check to make sure that the user is allowed to post new feeds
     $submitters = $CFG->block_rss_client_submitters;
         if ($rss === false) {
             print 'There was an error loading this rss feed. You may want to verify the url you have specified before using it.'; //Daryl Hawes note: localize this line
         } else {
-        
+            print_object($rss);
+            
             $dataobject->id = $rssid;
             if (!empty($rss->channel['description'])) {
                 $dataobject->description = addslashes($rss->channel['description']);
-            } else if (!empty($rss->channel['title'])) {
+            }
+            if (!empty($rss->channel['title'])) {
                 $dataobject->title = addslashes($rss->channel['title']);
             } 
             if (!update_record('block_rss_client', $dataobject)) {