From: stronk7 Date: Mon, 30 Jul 2007 19:13:19 +0000 (+0000) Subject: Delete some trailing whitespaces... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=29b71de660a17c6986eb60f0f9fdbc73f1513477;p=moodle.git Delete some trailing whitespaces... --- diff --git a/lib/rsslib.php b/lib/rsslib.php index 5327960057..49886a5fe2 100644 --- a/lib/rsslib.php +++ b/lib/rsslib.php @@ -47,7 +47,7 @@ function cron_rss_feeds () { global $CFG; $status = true; - + mtrace(' Generating rssfeeds...'); //Check for required functions... @@ -97,9 +97,9 @@ function cron_rss_feeds () { //This function saves to file the rss feed specified in the parameters function rss_save_file ($modname, $mod, $result) { - + global $CFG; - + $status = true; if (! $basedir = make_upload_directory ('rss/'. $modname)) { @@ -207,7 +207,7 @@ function rss_standard_header($title = NULL, $link = NULL, $description = NULL) { function rss_add_items($items) { global $CFG; - + $result = ''; if (!empty($items)) { @@ -268,7 +268,7 @@ function rss_geterrorxmlfile() { //XML Header $return = rss_standard_header(); - //XML item + //XML item if ($return) { $item->title = "RSS Error"; $item->link = $CFG->wwwroot; @@ -281,7 +281,7 @@ function rss_geterrorxmlfile() { if ($return) { $return .= rss_standard_footer(); } - + return $return; } @@ -371,7 +371,7 @@ function rss_display_feeds($courseid, $userid, $rssid='', $context) { $select = ''; $managesharedfeeds = has_capability('block/rss_client:manageanyfeeds', $context); $manageownfeeds = has_capability('block/rss_client:manageownfeeds', $context); - + if ($rssid != '') { $select = 'id = '.$rssid.' AND '; } @@ -407,10 +407,10 @@ function rss_display_feeds($courseid, $userid, $rssid='', $context) { if ( ($feed->userid == $USER->id && $manageownfeeds) || ($feed->shared && $managesharedfeeds) ) { - + $feedicons = ''. ''. get_string('edit').' '. - + ''. ''. get_string('delete').''; @@ -428,7 +428,7 @@ function rss_display_feeds($courseid, $userid, $rssid='', $context) { '. $feed->url .'
'.$feed->description.'
'; - + $table->add_data(array($feedinfo, $feedicons)); } } @@ -463,29 +463,29 @@ function rss_get_form($act='none', $url='', $rssid='', $preferredtitle='', $shar $stradd = get_string('add'); $strupdatefeed = get_string('updatefeed', 'block_rss_client'); $straddfeed = get_string('addfeed', 'block_rss_client'); - + $returnstring = ''; $returnstring .= '
'."\n"; print_location_comment(__FILE__,__LINE__); - $returnstring .= '
'."\n"; + $returnstring .= '
'."\n"; if ($act == 'rssedit') { - $returnstring .= $strupdatefeed; - } else { - $returnstring .= $straddfeed; + $returnstring .= $strupdatefeed; + } else { + $returnstring .= $straddfeed; } $returnstring .= "\n".'
'."\n"; $returnstring .= '
'. get_string('customtitlelabel', 'block_rss_client'); $returnstring .= '
'."\n"; @@ -499,7 +499,7 @@ function rss_get_form($act='none', $url='', $rssid='', $preferredtitle='', $shar $returnstring .= get_string('sharedfeed', 'block_rss_client'); $returnstring .= '
'."\n"; } - + $returnstring .= ''."\n"; - if ($act == 'rssedit') { - $returnstring .= ''. "\n"; + if ($act == 'rssedit') { + $returnstring .= ''. "\n"; } $returnstring .= ''."\n"; $returnstring .= ''."\n"; $returnstring .= ''."\n"; $returnstring .= '
". get_string('validatefeed', 'block_rss_client').""; + $validatestring = "". get_string('validatefeed', 'block_rss_client').""; if ($act == 'rssedit') { $returnstring .= $stredit; @@ -534,17 +533,17 @@ onclick=\"window.open('http://feedvalidator.org/check.cgi?url='+getElementId('bl /** * Adds RSS Media Enclosures for "podcasting" by examining links to media files, -* and attachments which are media files. Please note that the RSS that is +* and attachments which are media files. Please note that the RSS that is * produced cannot be strictly valid for the linked files, since we do not know -* the files' sizes and cannot include them in the "length" attribute. At +* the files' sizes and cannot include them in the "length" attribute. At * present, the validity (and therefore the podcast working in most software) * can only be ensured for attachments, and not for links. -* Note also that iTunes does some things very badly - one thing it does is +* Note also that iTunes does some things very badly - one thing it does is * refuse to download ANY of your files if you're using "file.php?file=blah" -* and can't use the more elegant "file.php/blah" slasharguments setting. It -* stops after ".php" and assumes the files are not media files, despite what +* and can't use the more elegant "file.php/blah" slasharguments setting. It +* stops after ".php" and assumes the files are not media files, despite what * is specified in the "type" attribute. Dodgy coding all round! -* +* * @param $item object representing an RSS item * @return string RSS enclosure tags * @author Hannes Gassert @@ -556,7 +555,7 @@ function rss_add_enclosures($item){ $returnstring = ''; $rss_text = $item->description; - + // list of media file extensions and their respective mime types include_once($CFG->libdir.'/filelib.php'); $mediafiletypes = get_mimetypes_array(); @@ -576,12 +575,12 @@ function rss_add_enclosures($item){ $returnstring .= "\nurl\" length=\"$attachment->length\" type=\"$type\" />\n"; } } - + if (!preg_match_all($medialinkpattern, $rss_text, $matches)){ return $returnstring; } - // loop over matches of regular expression + // loop over matches of regular expression for ($i = 0; $i < count($matches[2]); $i++){ $url = htmlspecialchars($matches[2][$i]); $extension = strtolower($matches[3][$i]); @@ -594,7 +593,7 @@ function rss_add_enclosures($item){ // the rss_*_tag functions can't deal with methods, unfortunately $returnstring .= "\n\n"; } - + return $returnstring; } ?>