Commit 0b9d57a2 authored by Chris Graham's avatar Chris Graham
Browse files

Fixed MANTIS-4728 (Error within Commandr-FS hook for catalogues, listing categories)

parent d203f95d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -156,6 +156,11 @@ class Hook_commandr_fs_catalogues extends Resource_fs_base
     */
    protected function _get_folder_edit_date($row)
    {
        if (array_key_exists('id', $row)) {
            $query = 'SELECT MAX(date_and_time) FROM ' . get_table_prefix() . 'actionlogs WHERE ' . db_string_equal_to('param_a', strval($row['id'])) . ' AND  (' . db_string_equal_to('the_type', 'ADD_CATALOGUE_CATEGORY') . ' OR ' . db_string_equal_to('the_type', 'EDIT_CATALOGUE_CATEGORY') . ')';
            return $GLOBALS['SITE_DB']->query_value_if_there($query);
        }

        $query = 'SELECT MAX(date_and_time) FROM ' . get_table_prefix() . 'actionlogs WHERE ' . db_string_equal_to('param_a', $row['c_name']) . ' AND  (' . db_string_equal_to('the_type', 'ADD_CATALOGUE') . ' OR ' . db_string_equal_to('the_type', 'EDIT_CATALOGUE') . ')';
        return $GLOBALS['SITE_DB']->query_value_if_there($query);
    }