SimpleDesk

SimpleDesk! => SimpleDesk Support => Topic started by: tfs on December 21, 2011, 01:13:11 PM

Title: WSOD on full action log
Post by: tfs on December 21, 2011, 01:13:11 PM
I've started getting the dreaded WSOD on my full action log, using SimpleDesk 2.0.  It appears to be only because the first page of the action log has a bug where it displays the entire log, and my entire log has grown to be over 5k entries.  The server is simply running out of memory or resources when trying to display the entire log on one page.  Here's a fix for that.



In sd_source/Subs-SimpleDeskAdmin.php



Line 37

- *  @param int $start Number of items into the log to start (for pagination). If nothing is given, fall back to 0, i.e the first log item.

+ *  @param int $start Number of items into the log to start (for pagination). If -1, return everything. If nothing is given, fall back to 0, i.e the first log item.



Line 98

-    ' . ($start != 0 ? 'LIMIT {int:start}, {int:items_per_page}' : ''),

+    ' . ($start != -1 ? 'LIMIT {int:start}, {int:items_per_page}' : ''),



In sd_source/SimpleDesk-Display.php



Line 781

-    $context['ticket_log'] = shd_load_action_log_entries(0, 10, '', '', 'la.id_ticket = ' . $context['ticket_id']);

+    $context['ticket_log'] = shd_load_action_log_entries(-1, 10, '', '', 'la.id_ticket = ' . $context['ticket_id']);




In sd_source/SimpleDesk-Profile.php



Line 754

-  $context['action_log'] = shd_load_action_log_entries(0, 10, '', '', 'la.id_member = ' . $memID);

+  $context['action_log'] = shd_load_action_log_entries(-1, 10, '', '', 'la.id_member = ' . $memID);

Title: Re: WSOD on full action log
Post by: tfs on December 21, 2011, 01:31:07 PM
BTW, does anyone remember how to adjust the pagination size on the full action log?
Title: Re: WSOD on full action log
Post by: venguard223 on December 21, 2011, 08:05:37 PM
Change $context['displaypage'] in SimpleDesk-Admin.php.