Permalink
Browse files

removed comparisons to NULL and added isset() calls instead as per JP…

…'s suggestion
  • Loading branch information...
1 parent 9bd49df commit f00679f5dac3331ba1820d1ba3bc2e035d907cff dhawes committed Oct 2, 2005
Showing with 4 additions and 4 deletions.
  1. +4 −4 blocks/rss_client/block_rss_client_action.php
@@ -59,14 +59,14 @@
$submitters = $CFG->block_rss_client_submitters;
$isteacher = empty($course) ? false : isteacher($id);
-if ($act == NULL) {
+if ( !isset($act) ) {
rss_display_feeds($id);
rss_print_form($act, $url, $rssid, $preferredtitle, $id);
print_footer();
die();
}
-if ($rssid != NULL) {
+if ( isset($rssid) ) {
$rss_record = get_record('block_rss_client', 'id', $rssid);
}
@@ -161,7 +161,7 @@
rss_display_feeds($id);
rss_print_form($act, $dataobject->url, $dataobject->id, $dataobject->preferredtitle, $id);
*/
-} else if ( $rss_record != NULL && $act == 'rss_edit' ) {
+} else if ( isset($rss_record) && $act == 'rss_edit' ) {
$preferredtitle = stripslashes_safe($rss_record->preferredtitle);
if (empty($preferredtitle)) {
@@ -183,7 +183,7 @@
redirect($referrer, get_string('feeddeleted', 'block_rss_client') );
-} else if ( $rss_record != NULL && $act == 'view' ) {
+} else if ( isset($rss_record) && $act == 'view' ) {
// echo $sql; //debug
// print_object($res); //debug
if (!$rss_record->id) {

0 comments on commit f00679f

Please sign in to comment.