Ignore:
Timestamp:
Feb 28, 2011, 10:50:28 AM (13 years ago)
Author:
patdenice
Message:

Some optimizations.

File:
1 copied

Legend:

Unmodified
Added
Removed
  • extensions/PWG_Stuffs/class.inc.php

    r9383 r9410  
    99  var $blocks = array();
    1010  var $pos = 'begin';
    11   var $template_var = array();
     11  var $prefixe = 'PLUGIN_INDEX_CONTENT_';
    1212
    1313  function stuffs()
     
    1717    if ($page['stuffs_section'] == 'on_picture')
    1818    {
    19       $this->template_var['begin'] = 'PLUGIN_PICTURE_BEFORE';
    20       $this->template_var['end'] = 'PLUGIN_PICTURE_AFTER';
     19      $this->prefixe = 'PLUGIN_PICTURE_';
    2120      $template->set_prefilter('header', array('stuffs', 'prefilter_picture_css'));
    2221      pwgs_picture_special_sections();
     
    2423    else
    2524    {
    26       $this->template_var['begin'] = 'PLUGIN_INDEX_CONTENT_BEFORE';
    27       $this->template_var['end'] = 'PLUGIN_INDEX_CONTENT_AFTER';
    2825      $template->set_prefilter( 'header', array('stuffs', 'prefilter_index_css') );
    2926    }
     
    5552
    5653    $query = '
    57 SELECT DISTINCT id, name, path, parent, datas, groups, show_title, id_line, width
     54SELECT DISTINCT id, name, path, datas, groups, show_title, id_line, width
    5855FROM ' . STUFFS_TABLE . '
    5956LEFT JOIN ' . USER_GROUP_TABLE . '
     
    9289        continue;
    9390      }
    94       if (isset($module['parent']) and !isset($pwg_loaded_plugins[$module['parent']]))
     91
     92      preg_match('#^'.preg_quote(PHPWG_PLUGINS_PATH).'([^/]*?)/#', $module['path'], $match);
     93      if (!isset($pwg_loaded_plugins[$match[1]]))
    9594      {
    9695        continue;
Note: See TracChangeset for help on using the changeset viewer.