From ab848302ee3badcf92e0591b45780c678ff522ea Mon Sep 17 00:00:00 2001 From: dhawes Date: Thu, 10 Nov 2005 23:33:03 +0000 Subject: [PATCH] bug 4244. extended max title entry field length to 128 from 64. replaced rss_edit with rssedit keyword everywhere. --- lib/rsslib.php | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/rsslib.php b/lib/rsslib.php index 8d1a8369e98..b7d68168614 100644 --- a/lib/rsslib.php +++ b/lib/rsslib.php @@ -333,9 +333,9 @@ define('MAGPIE_CACHE_ON', true); //might want to expose as an admin config optio define('MAGPIE_CACHE_FRESH_ONLY', false); //should be exposed as an admin config option define('MAGPIE_CACHE_AGE', $CFG->block_rss_timeout); if ($CFG->debug) { - define('MAGPIE_DEBUG', true); + define('MAGPIE_DEBUG', $CFG->debug); // magpie, like moodle, takes an integer debug } else { - define('MAGPIE_DEBUG', false); + define('MAGPIE_DEBUG', 0); // 0 is DEBUG off for magpie } // defines for config var block_rss_client_submitters @@ -357,12 +357,12 @@ function rss_display_feeds($courseid='', $userid='', $rssid='') { $select = ''; if (!isadmin()) { - $userid = $USER->id; + $userid = $USER->id; } if ($userid != '' && is_numeric($userid)) { - // if a user is specified and not an admin then only show their own feeds - $select = 'userid='. $userid; + // if a user is specified and not an admin then only show their own feeds + $select = 'userid='. $userid; } else if ($rssid != ''){ $select = 'id='. $rssid; } @@ -393,19 +393,18 @@ function rss_display_feeds($courseid='', $userid='', $rssid='') { if ($feed->userid == $USER->id || isadmin()) { - $feedicons = ''. + $feedicons = ''. ''. get_string('edit').' '. ''. + onclick="return confirm(\''. get_string('deletefeedconfirm', 'block_rss_client') .'\');">'. ''. get_string('delete').''; } else { $feedicons = ''; } - $feedinfo = '
' - .$feedtitle .'
'. $feed->url .'
'.$feed->description.'
'; + $feedinfo = '
'. $feedtitle .'
'. $feed->url .'
'.$feed->description.'
'; $table->add_data(array($feedinfo, $feedicons)); } @@ -439,7 +438,7 @@ function rss_print_form($act='none', $url='', $rssid='', $preferredtitle='', $co /** * Prints or returns a form for managing rss feed entries. - * @param string $act The current action. If "rss_edit" then and "update" button is used, otherwise "add" is used. + * @param string $act The current action. If "rssedit" then and "update" button is used, otherwise "add" is used. * @param string $url The url of the feed that is being updated or NULL * @param int $rssid The dataabse id of the feed that is being updated or NULL * @param int $id The id of the course that is currently being viewed if applicable @@ -456,36 +455,37 @@ function rss_get_form($act='none', $url='', $rssid='', $preferredtitle='', $cour $returnstring = '
'."\n"; $returnstring .= '
'."\n"; - if ($act == 'rss_edit') { + if ($act == 'rssedit') { $returnstring .= $strupdatefeed; } else { $returnstring .= $straddfeed; } $returnstring .= "\n".'
'."\n"; $returnstring .= '
'. get_string('customtitlelabel', 'block_rss_client'); - $returnstring .= '
'."\n"; $returnstring .= ''."\n"; - if ($act == 'rss_edit') { + if ($act == 'rssedit') { $returnstring .= ''. "\n"; } @@ -496,7 +496,7 @@ function rss_get_form($act='none', $url='', $rssid='', $preferredtitle='', $cour $validatestring = "". get_string('validatefeed', 'block_rss_client').""; - if ($act == 'rss_edit') { + if ($act == 'rssedit') { $returnstring .= $stredit; } else { $returnstring .= $stradd;