"DATA/MDL-18136, change to moodle coding style and fix incorrect parameter of data_get_field_from_id"
This commit is contained in:
+7
-3
@@ -154,7 +154,7 @@
|
||||
}
|
||||
if (!empty($fields)) {
|
||||
foreach($fields as $field) {
|
||||
$searchfield = data_get_field_from_id($field, $data);
|
||||
$searchfield = data_get_field_from_id($field->id, $data);
|
||||
//Get field data to build search sql with. If paging is false, get from user.
|
||||
//If paging is true, get data from $search_array which is obtained from the $SESSION (see line 116).
|
||||
if(!$paging) {
|
||||
@@ -613,7 +613,9 @@
|
||||
|
||||
if ($mode == 'single') { // Single template
|
||||
$baseurl = 'view.php?d=' . $data->id . '&mode=single&';
|
||||
$search && $baseurl .= 'filter=1&';
|
||||
if (!empty($search)) {
|
||||
$baseurl .= 'filter=1&';
|
||||
}
|
||||
print_paging_bar($totalcount, $page, $nowperpage, $baseurl, $pagevar='page');
|
||||
|
||||
if (empty($data->singletemplate)){
|
||||
@@ -629,7 +631,9 @@
|
||||
$baseurl = 'view.php?d='.$data->id.'&';
|
||||
//send the advanced flag through the URL so it is remembered while paging.
|
||||
$baseurl .= 'advanced='.$advanced.'&';
|
||||
$search && $baseurl .= 'filter=1&';
|
||||
if (!empty($search)) {
|
||||
$baseurl .= 'filter=1&';
|
||||
}
|
||||
//pass variable to allow determining whether or not we are paging through results.
|
||||
$baseurl .= 'paging='.$paging.'&';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user