Commit b4de176fcbc60441431cb30058975f9b5dd919db
1 parent
521ea230
Get the portlets to add to the page from the portlet registry.
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4044 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
10 additions
and
3 deletions
lib/dispatcher.inc.php
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | require_once(KT_LIB_DIR . '/validation/dispatchervalidation.inc.php'); | 3 | require_once(KT_LIB_DIR . '/validation/dispatchervalidation.inc.php'); |
| 4 | +require_once(KT_LIB_DIR . '/actions/portletregistry.inc.php'); | ||
| 4 | require_once(KT_LIB_DIR . "/widgets/portlet.inc.php"); | 5 | require_once(KT_LIB_DIR . "/widgets/portlet.inc.php"); |
| 5 | 6 | ||
| 6 | 7 | ||
| @@ -197,9 +198,15 @@ class KTStandardDispatcher extends KTDispatcher { | @@ -197,9 +198,15 @@ class KTStandardDispatcher extends KTDispatcher { | ||
| 197 | } | 198 | } |
| 198 | $_SESSION['KTInfoMessage'] = array(); // clean it out. | 199 | $_SESSION['KTInfoMessage'] = array(); // clean it out. |
| 199 | } | 200 | } |
| 200 | - | ||
| 201 | - // add last, standard portlets | ||
| 202 | - $this->oPage->addPortlet(new KTSearchPortlet()); | 201 | + |
| 202 | + // Get the portlets to display from the portlet registry | ||
| 203 | + $oPRegistry =& KTPortletRegistry::getSingleton(); | ||
| 204 | + $aPortlets = $oPRegistry->getPortletsForPage($this->aBreadcrumbs); | ||
| 205 | + foreach ($aPortlets as $oPortlet) { | ||
| 206 | + $oPortlet->setDispatcher($this); | ||
| 207 | + $this->oPage->addPortlet($oPortlet); | ||
| 208 | + } | ||
| 209 | + | ||
| 203 | $this->oPage->render(); | 210 | $this->oPage->render(); |
| 204 | } | 211 | } |
| 205 | 212 |