News:

Looking for a good read? Check out the SimpleDesk Team Blog.

Main Menu

WSOD on full action log

Started by tfs, December 21, 2011, 01:13:11 PM

Previous topic - Next topic

tfs

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);

A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

tfs

BTW, does anyone remember how to adjust the pagination size on the full action log?
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

venguard223

Change $context['displaypage'] in SimpleDesk-Admin.php.