]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-15425 Coding style: Change some logical operator uses. Thanks Robert! Merged...
authorstronk7 <stronk7>
Tue, 18 Nov 2008 00:10:13 +0000 (00:10 +0000)
committerstronk7 <stronk7>
Tue, 18 Nov 2008 00:10:13 +0000 (00:10 +0000)
mod/data/lib.php
mod/data/view.php

index 861e5fdc782781498671573fffdbe4cfb78098e4..d7664bf9f4775efc112780a24023304c6559f30c 100755 (executable)
@@ -1012,7 +1012,9 @@ function data_print_template($template, $records, $data, $search='', $page=0, $r
         }
 
         $moreurl = $CFG->wwwroot . '/mod/data/view.php?d=' . $data->id . '&amp;rid=' . $record->id;
-        $search && $moreurl .= '&amp;filter=1';
+        if ($search) {
+            $moreurl .= '&amp;filter=1';
+        }
         $patterns[]='##more##';
         $replacement[] = '<a href="' . $moreurl . '"><img src="' . $CFG->pixpath . '/i/search.gif" class="iconsmall" alt="' . get_string('more', 'data') . '" title="' . get_string('more', 'data') . '" /></a>';
 
index dd1b690c7a6779753ed4eca559a864139b787af6..c1298b8ae9a307026d589fd7597356a142151b30 100755 (executable)
     }
 
     // Disable search filters if $filter is not true:
-    $filter || $search = '';
+    if (! $filter) {
+        $search = '';
+    }
 
     $textlib = textlib_get_instance();
     if ($textlib->strlen($search) < 2) {