Code Duplication    Length = 9-9 lines in 2 locations

group/models/group.class.php 1 location

@@ 75-83 (lines=9) @@
72
73
      $limit_sql = " LIMIT {$start_record}, {$stop_record} ";
74
75
      if ($sort_field) {
76
          switch ($sort_field) {
77
        case 'last_modified':
78
          $sort = " ORDER BY group.last_modified {$sort_order} ";
79
          break;
80
        default:
81
          $sort = " ORDER BY {$sort_field} {$sort_order} ";
82
        }
83
      }
84
85
      if ($search) {
86
          $pdo_params[] = '%'.$search.'%';

user_account/models/user_account.class.php 1 location

@@ 81-89 (lines=9) @@
78
79
      $limit_sql = " LIMIT {$start_record}, {$stop_record} ";
80
81
      if ($sort_field) {
82
          switch ($sort_field) {
83
          case 'last_modified':
84
              $sort = " ORDER BY user_account_groups.last_modified {$sort_order} ";
85
          break;
86
          default:
87
              $sort = " ORDER BY {$sort_field} {$sort_order} ";
88
        }
89
      }
90
91
      $and_user_account_id = $user_account_id ? " AND user_account.user_account_id = {$user_account_id} " : "";
92