Commit 13e188c0717b2e45175b11e6d7b7de5866d1d156
1 parent
8bc351f3
Merged in from DEV trunk...
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/STABLE/trunk@7055 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,7 +67,8 @@ class TagCloudDashlet extends KTBaseDashlet { | ||
| 67 | $oTemplate = $oTemplating->loadTemplate('TagCloud/dashlet'); | 67 | $oTemplate = $oTemplating->loadTemplate('TagCloud/dashlet'); |
| 68 | 68 | ||
| 69 | $aTags = & $this->get_relevant_tags(); | 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 | $oRegistry =& KTPluginRegistry::getSingleton(); | 73 | $oRegistry =& KTPluginRegistry::getSingleton(); |
| 73 | $oPlugin =& $oRegistry->getPlugin('ktcore.tagcloud.plugin'); | 74 | $oPlugin =& $oRegistry->getPlugin('ktcore.tagcloud.plugin'); |
| @@ -120,7 +121,10 @@ class TagCloudDashlet extends KTBaseDashlet { | @@ -120,7 +121,10 @@ class TagCloudDashlet extends KTBaseDashlet { | ||
| 120 | */ | 121 | */ |
| 121 | function & get_relevant_tags() | 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 | list($where, $params, $joins) = KTSearchUtil::permissionToSQL($this->oUser, null); | 128 | list($where, $params, $joins) = KTSearchUtil::permissionToSQL($this->oUser, null); |
| 125 | 129 | ||
| 126 | 130 |