Commit 45120a284f7cef4318c8346e5d893db2fe8ef7ae

Authored by Megan Watson
1 parent d439c80e

KTC-286

"Welcome to knowledgeTree dashlet should always be on the top left corner of the dashlet container"
Updated. Moved the sql ignore into an if not empty statement. 

Committed by: Megan Watson
Reviewed by: Conrad Vermeulen



git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@7828 c91229c3-7414-0410-bfa2-8a42b809f60b
lib/dashboard/dashletregistry.inc.php
... ... @@ -66,10 +66,13 @@ class KTDashletRegistry {
66 66 $sIgnore = (!empty($sInactive)) ? $sCurrent.','.$sInactive : $sCurrent;
67 67  
68 68 // Get all dashlets that haven't already been displayed to the user and are active for the user
69   - $query = "SELECT * FROM plugin_helper h
  69 + $query = "SELECT h.classname, h.pathname, h.plugin FROM plugin_helper h
70 70 INNER JOIN plugins p ON (h.plugin = p.namespace)
71   - WHERE p.disabled = 0 AND classtype = 'dashlet'
72   - AND h.classname NOT IN ($sIgnore)";
  71 + WHERE p.disabled = 0 AND classtype = 'dashlet' ";
  72 +
  73 + if(!empty($sIgnore)){
  74 + $query .= " AND h.classname NOT IN ($sIgnore)";
  75 + }
73 76  
74 77 $res = DBUtil::getResultArray($query);
75 78  
... ...