Commit 0782fbde23af8a70a9b6bd0698cc64506b5b4857
1 parent
5432f6e7
KTS-2360
"Remove cache logging." Updated. Committed By: Conrad Vermeulen Reviewed By: Kevin Fourie git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@7204 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
21 additions
and
21 deletions
lib/widgets/portlet.inc.php
| ... | ... | @@ -6,7 +6,7 @@ |
| 6 | 6 | * License Version 1.1.2 ("License"); You may not use this file except in |
| 7 | 7 | * compliance with the License. You may obtain a copy of the License at |
| 8 | 8 | * http://www.knowledgetree.com/KPL |
| 9 | - * | |
| 9 | + * | |
| 10 | 10 | * Software distributed under the License is distributed on an "AS IS" |
| 11 | 11 | * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. |
| 12 | 12 | * See the License for the specific language governing rights and |
| ... | ... | @@ -17,9 +17,9 @@ |
| 17 | 17 | * (ii) the KnowledgeTree copyright notice |
| 18 | 18 | * in the same form as they appear in the distribution. See the License for |
| 19 | 19 | * requirements. |
| 20 | - * | |
| 20 | + * | |
| 21 | 21 | * The Original Code is: KnowledgeTree Open Source |
| 22 | - * | |
| 22 | + * | |
| 23 | 23 | * The Initial Developer of the Original Code is The Jam Warehouse Software |
| 24 | 24 | * (Pty) Ltd, trading as KnowledgeTree. |
| 25 | 25 | * Portions created by The Jam Warehouse Software (Pty) Ltd are Copyright |
| ... | ... | @@ -34,7 +34,7 @@ |
| 34 | 34 | * Very simple wrapper that establishes the absolutely basic API. |
| 35 | 35 | * |
| 36 | 36 | */ |
| 37 | - | |
| 37 | + | |
| 38 | 38 | require_once(KT_LIB_DIR . "/templating/templating.inc.php"); |
| 39 | 39 | |
| 40 | 40 | |
| ... | ... | @@ -43,28 +43,28 @@ class KTPortlet { |
| 43 | 43 | var $sTitle; |
| 44 | 44 | var $oPlugin; |
| 45 | 45 | var $bActive = false; |
| 46 | - | |
| 46 | + | |
| 47 | 47 | function KTPortlet($title='') { |
| 48 | 48 | $this->sTitle = $title; |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | function setPlugin(&$oPlugin) { |
| 52 | 52 | global $default; |
| 53 | - $default->log->debug('portlet regging plugin: ' . $oPlugin->sNamespace); | |
| 53 | + if (KTLOG_CACHE) $default->log->debug('portlet regging plugin: ' . $oPlugin->sNamespace); | |
| 54 | 54 | $this->oPlugin =& $oPlugin; |
| 55 | 55 | } |
| 56 | - | |
| 56 | + | |
| 57 | 57 | // this should multiplex i18n_title |
| 58 | 58 | function getTitle() { return $this->sTitle; } |
| 59 | - | |
| 59 | + | |
| 60 | 60 | function render() { |
| 61 | 61 | return '<p class="ktError">Warning: Abstract Portlet created.</p>'; |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | function setDispatcher(&$oDispatcher) { |
| 65 | - $this->oDispatcher =& $oDispatcher; | |
| 65 | + $this->oDispatcher =& $oDispatcher; | |
| 66 | 66 | } |
| 67 | - | |
| 67 | + | |
| 68 | 68 | function getActive() { |
| 69 | 69 | return $this->bActive; |
| 70 | 70 | } |
| ... | ... | @@ -82,32 +82,32 @@ class KTNavPortlet extends KTPortlet { |
| 82 | 82 | function setOldNavItems($aNavLinks) { |
| 83 | 83 | |
| 84 | 84 | $this->navItems = array_map(array(&$this, "_oldNavZip"), $aNavLinks["descriptions"], $aNavLinks["links"]); |
| 85 | - | |
| 85 | + | |
| 86 | 86 | } |
| 87 | - | |
| 87 | + | |
| 88 | 88 | // legacy support helper |
| 89 | 89 | function _oldNavZip($d, $u) { |
| 90 | 90 | $aZip = array( |
| 91 | - "label" => $d, | |
| 91 | + "label" => $d, | |
| 92 | 92 | "url" => $u, |
| 93 | 93 | ); |
| 94 | 94 | return $aZip; |
| 95 | 95 | } |
| 96 | - | |
| 96 | + | |
| 97 | 97 | function render() { |
| 98 | - $oTemplating =& KTTemplating::getSingleton(); | |
| 98 | + $oTemplating =& KTTemplating::getSingleton(); | |
| 99 | 99 | $oTemplate = $oTemplating->loadTemplate("kt3/portlets/nav_portlet"); |
| 100 | 100 | $aTemplateData = array( |
| 101 | 101 | "context" => $this, |
| 102 | 102 | ); |
| 103 | 103 | |
| 104 | - return $oTemplate->render($aTemplateData); | |
| 104 | + return $oTemplate->render($aTemplateData); | |
| 105 | 105 | } |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | class KTActionPortlet extends KTPortlet { |
| 109 | 109 | var $actions = array(); |
| 110 | - | |
| 110 | + | |
| 111 | 111 | var $bActive = true; |
| 112 | 112 | |
| 113 | 113 | // current action is the one we are currently on. |
| ... | ... | @@ -124,21 +124,21 @@ class KTActionPortlet extends KTPortlet { |
| 124 | 124 | } |
| 125 | 125 | } |
| 126 | 126 | ksort($this->actions); |
| 127 | - | |
| 127 | + | |
| 128 | 128 | //echo '<pre>'; print_r($this->actions); |
| 129 | 129 | } |
| 130 | - | |
| 130 | + | |
| 131 | 131 | function render() { |
| 132 | 132 | if (empty($this->actions)) { |
| 133 | 133 | return null; |
| 134 | 134 | } |
| 135 | - $oTemplating =& KTTemplating::getSingleton(); | |
| 135 | + $oTemplating =& KTTemplating::getSingleton(); | |
| 136 | 136 | $oTemplate = $oTemplating->loadTemplate("kt3/portlets/actions_portlet"); |
| 137 | 137 | $aTemplateData = array( |
| 138 | 138 | "context" => $this, |
| 139 | 139 | ); |
| 140 | 140 | |
| 141 | - return $oTemplate->render($aTemplateData); | |
| 141 | + return $oTemplate->render($aTemplateData); | |
| 142 | 142 | } |
| 143 | 143 | } |
| 144 | 144 | ... | ... |