Commit 22d009b2de492e34683ff601919bc3bb015c201a
1 parent
d19a9af0
KTS-2194
"Fatal error on dashboard when logging on as a user - tag cloud dashlet" Fixed. Added catch for pear error to TagCloudDashlet.php. Committed By: Jalaloedien Abrahams Reviewed By: Conrad Vermeulen git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@7053 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
6 additions
and
2 deletions
plugins/tagcloud/TagCloudDashlet.php
| ... | ... | @@ -67,7 +67,8 @@ class TagCloudDashlet extends KTBaseDashlet { |
| 67 | 67 | $oTemplate = $oTemplating->loadTemplate('TagCloud/dashlet'); |
| 68 | 68 | |
| 69 | 69 | $aTags = & $this->get_relevant_tags(); |
| 70 | - $aTags = & $this->get_tag_weightings($aTags); | |
| 70 | + if($aTags) | |
| 71 | + $aTags = & $this->get_tag_weightings($aTags); | |
| 71 | 72 | |
| 72 | 73 | $oRegistry =& KTPluginRegistry::getSingleton(); |
| 73 | 74 | $oPlugin =& $oRegistry->getPlugin('ktcore.tagcloud.plugin'); |
| ... | ... | @@ -120,7 +121,10 @@ class TagCloudDashlet extends KTBaseDashlet { |
| 120 | 121 | */ |
| 121 | 122 | function & get_relevant_tags() |
| 122 | 123 | { |
| 123 | - | |
| 124 | + $aUserPermissions = KTSearchUtil::permissionToSQL($this->oUser, null); | |
| 125 | + if(PEAR::isError($aUserPermissions)) { | |
| 126 | + return false; | |
| 127 | + } | |
| 124 | 128 | list($where, $params, $joins) = KTSearchUtil::permissionToSQL($this->oUser, null); |
| 125 | 129 | |
| 126 | 130 | ... | ... |