4545 7 => __ ('Authorization Failed ' , 'mactrack ' )
4646 ];
4747
48-
4948/**
5049 * plugin_get_rows_per_page - resolve rows-per-page from request vars
5150 *
@@ -56,14 +55,15 @@ function plugin_get_rows_per_page() {
5655
5756 if ($ rows == -1 ) {
5857 return read_config_option ('num_rows_table ' );
59- } elseif ($ rows == -2 ) {
58+ }
59+
60+ if ($ rows == -2 ) {
6061 return 999999 ;
6162 }
6263
6364 return $ rows ;
6465}
6566
66-
6767function mactrack_debug ($ message ) {
6868 global $ debug , $ web , $ config ;
6969
@@ -3323,17 +3323,17 @@ function mactrack_dot1x_row_class($port_result) {
33233323}
33243324
33253325/** mactrack_create_sql_filter - this routine will take a filter string and process it into a
3326- sql where clause that will be returned to the caller with a formatted SQL where clause
3327- that can then be integrated into the overall where clause.
3328- The filter takes the following forms. The default is to find occurrence that match "all"
3329- Any string prefixed by a "-" will mean "exclude" this search string. Boolean expressions
3330- are currently not supported.
3331- @arg $filter - (string) The filter provided by the user
3332- @arg $fields - (array) A list of field names to include in the where clause. They can also
3333- contain the table name in cases where joins are important.
3334- * @param mixed $filter
3335- * @param mixed $fields
3336- @returns - (string) The formatted SQL syntax */
3326+ * sql where clause that will be returned to the caller with a formatted SQL where clause
3327+ * that can then be integrated into the overall where clause.
3328+ * The filter takes the following forms. The default is to find occurrence that match "all"
3329+ * Any string prefixed by a "-" will mean "exclude" this search string. Boolean expressions
3330+ * are currently not supported.
3331+ * @arg $filter - (string) The filter provided by the user
3332+ * @arg $fields - (array) A list of field names to include in the where clause. They can also
3333+ * contain the table name in cases where joins are important.
3334+ * @param mixed $filter
3335+ * @param mixed $fields
3336+ * @returns - (string) The formatted SQL syntax */
33373337function mactrack_create_sql_filter ($ filter , $ fields ) {
33383338 $ query = '' ;
33393339
@@ -3369,7 +3369,7 @@ function mactrack_create_sql_filter($filter, $fields) {
33693369 $ query .= '( ' ;
33703370 }
33713371
3372- $ query .= ($ field_no == 1 ? '' : " $ operator " ) . "( $ field $ type LIKE " . db_qstr ('% ' . $ filter . '% ' ) . " ) " ;
3372+ $ query .= ($ field_no == 1 ? '' : " $ operator " ) . "( $ field $ type LIKE " . db_qstr ('% ' . $ filter . '% ' ) . ' ) ' ;
33733373
33743374 $ field_no ++;
33753375 }
0 commit comments