Exemplo n.º 1
0
 /**
  * Initializes all the things for a mm_forum plugin that is needed
  * Should be run as the first thing when a plugin is called
  *
  * @param   string $conf the configuration array for the plugin
  * @return  void
  */
 function init($conf)
 {
     $this->conf = $conf;
     $this->pi_setPiVarDefaults();
     $this->pi_loadLL();
     /* Initialize cache object */
     $this->cache = tx_mmforum_cache::getGlobalCacheObject($this->conf['caching'], $this->conf['caching.']);
     /* get the PID List */
     if (!$this->conf['pidList']) {
         $this->conf['pidList'] = $this->pi_getPidList($this->cObj->data['pages'], $this->cObj->data['recursive']);
     }
     $this->conf['path_img'] = str_replace('EXT:mm_forum/', ExtensionManagementUtility::siteRelPath('mm_forum'), $this->conf['path_img']);
     $this->conf['path_smilie'] = str_replace('EXT:mm_forum/', ExtensionManagementUtility::siteRelPath('mm_forum'), $this->conf['path_smilie']);
     if (!class_exists('tx_pagebrowse_pi1')) {
         include_once ExtensionManagementUtility::extPath('pagebrowse') . 'pi1/class.tx_pagebrowse_pi1.php';
     }
     if ($this->conf['debug']) {
         $GLOBALS['TYPO3_DB']->debugOutput = true;
     }
 }
Exemplo n.º 2
0
 /**
  * Determines a user group's sub user groups.
  * This functions delivers a comma separated list of all subordinate user
  * groups of a frontend user group. Subgroups are determined recursively
  * up to infinity.
  *
  * @author  Martin Helmich <*****@*****.**>
  * @version 2007-11-24
  * @param   mixed  $group The user group UID whose subgroups are to be checked.
  *                        This parameter may either be a single UID or a comma
  *                        seperated list of UIDs.
  * @return  string        A comma separated list of the groups and all of their
  *                        subgroups.
  * @deprecated Not in use
  */
 function getSubUserGroups($group)
 {
     /* Parse to int for security reasons */
     $group = intval($group);
     /* Try to load value from cache */
     $cache =& tx_mmforum_cache::getGlobalCacheObject();
     $cacheRes = $cache->restore('sgrpCache_' . $group);
     /* If value was found in cache, return */
     if ($cacheRes !== null) {
         return $cacheRes;
     }
     /* Otherwise load all subgroups now */
     $groups = tx_mmforum_tools::getSubUserGroupsR($group);
     $groups = GeneralUtility::intExplode(',', $groups);
     $groups = tx_mmforum_tools::processArray_numeric($groups);
     $groups = array_unique($groups);
     /* Implode to string */
     $groupString = implode(',', $groups);
     /* Save to cache and return */
     $cache->save('sgrpCache_' . $group, $groupString);
     return $groupString;
 }