zikula/core — Issue #161: PATCH for wrong top level module in Zikula_View
Author: Guite
Created: 2011-11-07 09:28:12+00:00
State: open

If using shorturls with suppressing the name of module A, but module B is set for the start page, then B is considered as top level module for all pages of A.

To fix this change ModUtil::getName() like this:

if (!isset(self::$cache['modgetname'])) {
self::$cache['modgetname'] = FormUtil::getPassedValue('module', null, 'GETPOST', FILTER_SANITIZE_STRING);

// THIS IS NEW
if (empty(self::$cache['modgetname']) && System::getVar('shorturls', 0) == 1) {
self::$cache['modgetname'] = System::getVar('shorturlsdefaultmodule');
}

if (empty(self::$cache['modgetname'])) {
self::$cache['modgetname'] = System::getVar('startpage');
}

....