From 88dffda52c15efa91810a2d67636938065ab4b7e Mon Sep 17 00:00:00 2001 From: stronk7 Date: Mon, 30 Jul 2007 17:11:55 +0000 Subject: [PATCH] Cleaning some trailing spaces here and there. --- blocks/rss_client/block_rss_client.php | 20 ++++++++--------- blocks/rss_client/block_rss_client_action.php | 22 +++++++++---------- blocks/rss_client/block_rss_client_error.php | 6 ++--- blocks/rss_client/config_global.html | 8 +++---- blocks/rss_client/config_instance.html | 14 ++++++------ blocks/rss_client/config_instance_tabs.php | 4 ++-- 6 files changed, 37 insertions(+), 37 deletions(-) diff --git a/blocks/rss_client/block_rss_client.php b/blocks/rss_client/block_rss_client.php index 5ff215808a..6addd6135f 100644 --- a/blocks/rss_client/block_rss_client.php +++ b/blocks/rss_client/block_rss_client.php @@ -13,7 +13,7 @@ /** * This class is for a block which defines a block for display on - * any Moodle page. + * any Moodle page. */ class block_rss_client extends block_base { @@ -43,7 +43,7 @@ function get_content() { global $CFG, $editing, $COURSE, $USER; - + if (!empty($COURSE)) { $this->courseid = $COURSE->id; } @@ -74,7 +74,7 @@ if (!empty($this->config)) { if (!empty($this->config->rssid)) { - if (is_array($this->config->rssid)) { + if (is_array($this->config->rssid)) { $rssidarray = $this->config->rssid; } else { // Make an array of the single value $rssidarray = array($this->config->rssid); @@ -87,9 +87,9 @@ $shownumentries = intval($this->config->shownumentries); } } - + $context = get_context_instance(CONTEXT_BLOCK, $this->instance->id); - + if (has_capability('block/rss_client:createsharedfeeds', $context) || has_capability('block/rss_client:createprivatefeeds', $context)) { @@ -187,7 +187,7 @@ return 'Error loading a feed.
'; //Daryl Hawes note: localize this line } } - + if ($shownumentries > 0 && $shownumentries < count($rss->items) ) { $rss->items = array_slice($rss->items, 0, $shownumentries); } @@ -198,8 +198,8 @@ $feedtitle = $this->format_title($rss_record->preferredtitle); } // print_object($rss); - if (isset($this->config) && - isset($this->config->block_rss_client_show_channel_image) && + if (isset($this->config) && + isset($this->config->block_rss_client_show_channel_image) && $this->config->block_rss_client_show_channel_image && isset($rss->image) && isset($rss->image['link']) && isset($rss->image['title']) && isset($rss->image['url']) ) { $returnstring .= "\n".'
'. $rss->image['title'] .'
'; @@ -240,7 +240,7 @@ if ($display_description && !empty($item['description'])) { $item['description'] = break_up_long_words($item['description'], 30); $returnstring .= '
'. - format_text($item['description'], FORMAT_MOODLE, $formatoptions, $this->courseid) . + format_text($item['description'], FORMAT_MOODLE, $formatoptions, $this->courseid) . '
'; } $returnstring .= "\n"; @@ -249,7 +249,7 @@ if (!empty($rss->channel['link'])) { $rss->channel['link'] = str_replace('&', '&', $rss->channel['link']); - + if (!empty($this->config) && isset($this->config->block_rss_client_show_channel_link) && $this->config->block_rss_client_show_channel_link) { $this->content->footer = ''. get_string('clientchannellink', 'block_rss_client') .''; } diff --git a/blocks/rss_client/block_rss_client_action.php b/blocks/rss_client/block_rss_client_action.php index b9ece54889..9c4d9ed54b 100644 --- a/blocks/rss_client/block_rss_client_action.php +++ b/blocks/rss_client/block_rss_client_action.php @@ -97,14 +97,14 @@ if (isset($rss_record)) { if ($act == 'updfeed') { - + if (!$managefeeds) { error(get_string('noguestpost', 'forum'). ' You are not allowed to make modifications to this RSS feed at this time.', $referrer); } - - + + if (empty($url)) { error( 'URL not defined for rss feed' ); } @@ -148,10 +148,10 @@ if ($act == 'updfeed') { redirect($referrer, $message); } else if ($act == 'addfeed' ) { - + $canaddprivfeeds = has_capability('block/rss_client:createprivatefeeds', $context); $canaddsharedfeeds = has_capability('block/rss_client:createsharedfeeds', $context); - + if (!$canaddprivfeeds && !$canaddsharedfeeds) { error('You do not have the permission to add RSS feeds'); } @@ -164,13 +164,13 @@ if ($act == 'updfeed') { $dataobject->title = ''; $dataobject->url = addslashes($url); $dataobject->preferredtitle = addslashes($preferredtitle); - + if ($shared == 1 && $canaddsharedfeeds) { $dataobject->shared = 1; } else { $dataobject->shared = 0; } - + $rssid = insert_record('block_rss_client', $dataobject); if (!$rssid) { error('There was an error trying to add a new rss feed:'. $url); @@ -197,7 +197,7 @@ if ($act == 'updfeed') { } if (!empty($rss->channel['title'])) { $dataobject->title = addslashes($rss->channel['title']); - } + } if (!update_record('block_rss_client', $dataobject)) { error('There was an error trying to update rss feed with id:'. $rssid); } @@ -220,7 +220,7 @@ if ($act == 'updfeed') { rss_print_form($act, $url, $rssid, $preferredtitle, $shared, $id, $context); } else if ($act == 'delfeed') { - + if (!$managefeeds) { error(get_string('noguestpost', 'forum'). ' You are not allowed to make modifications to this RSS feed at this time.', @@ -273,10 +273,10 @@ if ($act == 'updfeed') { if (file_exists($CFG->dirroot .'/blog/lib.php')) { //Blog module is installed - provide "blog this" link print ''."\n"; - + /// MDL-9291, blog this feature needs further discussion/implementation /// temporarily disabling for now. - + // print ''. get_string('blogthis', 'blog').''."\n"; //print ''. get_string('blogthis', 'blog') .''."\n"; } else { diff --git a/blocks/rss_client/block_rss_client_error.php b/blocks/rss_client/block_rss_client_error.php index 11ef4aa912..14ab2aae27 100644 --- a/blocks/rss_client/block_rss_client_error.php +++ b/blocks/rss_client/block_rss_client_error.php @@ -4,11 +4,11 @@ require_once('../../config.php'); $error = required_param('error', PARAM_CLEAN); -print_header(get_string('error'), - get_string('error'), +print_header(get_string('error'), + get_string('error'), get_string('error') ); print clean_text(urldecode($error)); print_footer(); -?> \ No newline at end of file +?> diff --git a/blocks/rss_client/config_global.html b/blocks/rss_client/config_global.html index 83891342a6..16e8469aaf 100644 --- a/blocks/rss_client/config_global.html +++ b/blocks/rss_client/config_global.html @@ -6,7 +6,7 @@ block_rss_client_num_entries: - block_rss_timeout: - - - block_rss_client_display_description) ) { $CFG->block_rss_client_display_description = '0'; } @@ -65,7 +65,7 @@ print_box_start(); - config) && isset($this->config->rssid)) { if (is_array($this->config->rssid)) { @@ -77,14 +77,14 @@ print_box_start(); } } global $USER; - + if ($rssfeeds = get_records_select('block_rss_client', 'userid = '.$USER->id.' OR shared = 1')) { foreach($rssfeeds as $rssfeed) { if (!empty($rssfeed->preferredtitle)) { $feedtitle = stripslashes_safe($rssfeed->preferredtitle); } else { $feedtitle = stripslashes_safe($rssfeed->title); - } + } $checked = ''; if (in_array($rssfeed->id, $selectedarray)) { $checked = 'checked="checked"'; @@ -95,10 +95,10 @@ print_box_start(); } else { $context = get_context_instance(CONTEXT_BLOCK, $this->instance->id); print_string('nofeeds', 'block_rss_client'); - + if (has_capability('block/rss_client:createprivatefeeds', $context) || has_capability('block/rss_client:createsharedfeeds', $context)) { - + $addrsspage = $page->url_get_full(array('instanceid' => $this->instance->id, 'sesskey' => $USER->sesskey, 'blockaction' => 'config', @@ -113,7 +113,7 @@ print_box_start(); - config) && !empty($this->config->title)) { $title = $this->config->title; diff --git a/blocks/rss_client/config_instance_tabs.php b/blocks/rss_client/config_instance_tabs.php index 2a3230cf3d..3ba5cc1540 100644 --- a/blocks/rss_client/config_instance_tabs.php +++ b/blocks/rss_client/config_instance_tabs.php @@ -10,12 +10,12 @@ $context = get_context_instance(CONTEXT_BLOCK, $this->instance->id); if (has_capability('moodle/site:manageblocks', $context)) { $script = $page->url_get_full(array('instanceid' => $this->instance->id, 'sesskey' => $USER->sesskey, 'blockaction' => 'config', 'currentaction' => 'configblock', 'id' => $id, 'section' => 'rss')); - $row[] = new tabobject('configblock', $script, + $row[] = new tabobject('configblock', $script, get_string('configblock', 'block_rss_client')); } $script = $page->url_get_full(array('instanceid' => $this->instance->id, 'sesskey' => $USER->sesskey, 'blockaction' => 'config', 'currentaction' => 'managefeeds', 'id' => $id, 'section' => 'rss')); -$row[] = new tabobject('managefeeds', $script, +$row[] = new tabobject('managefeeds', $script, get_string('managefeeds', 'block_rss_client')); $tabs[] = $row; -- 2.39.5