Commit 0782fbde23af8a70a9b6bd0698cc64506b5b4857

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