ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 8553


Ignore:
Timestamp:
Oct 2, 2008, 6:52:42 PM (11 years ago)
Author:
ebihara
Message:

#3029:不要となった設定項目に関する処理を削除

Location:
OpenPNE3/trunk/lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/trunk/lib/config/sfOpenPNEViewConfigHandler.class.php

    r8548 r8553  
    8282      $parts .= ')';
    8383
    84       $action = 'array(';
    85       if (!empty($customize['action']) && is_array($customize['action']))
    86       {
    87         foreach ($customize['action'] as $value)
    88         {
    89           $action .= '\'' . $value . '\',';
    90         }
    91       }
    92       $action .= ')';
    93 
    9484      $target = 'array(';
    9585      if (!empty($customize['target']) && is_array($customize['target']))
     
    10191      $target .= ')';
    10292
    103       $data .= "  \$this->setCustomize('$name', '{$template[0]}', '{$template[1]}', $category, $parts, $action, $target);\n";
     93      $data .= "  \$this->setCustomize('$name', '{$template[0]}', '{$template[1]}', $category, $parts, $target);\n";
    10494      $data .= "  if (sfConfig::get('sf_logging_enabled')) \$this->context->getEventDispatcher()->notify(new sfEvent(\$this, 'application.log', array(sprintf('Set customize \"%s\" (%s/%s)', '$name', '{$template[0]}', '{$template[1]}'))));\n";
    10595    }
  • OpenPNE3/trunk/lib/helper/PartsHelper.php

    r8548 r8553  
    3737{
    3838  $context = sfContext::getInstance();
    39   $lastActionStack = $context->getActionStack()->getLastEntry();
    40   $lastAction = $lastActionStack->getModuleName().'/'.$lastActionStack->getActionName();
    4139
    42   $viewInstance = sfContext::getInstance()->get('view_instance');
    43   $customizes = $viewInstance->getCustomize('', $id, $lastAction, $name);
     40  $viewInstance = $context->get('view_instance');
     41  $customizes = $viewInstance->getCustomize('', $id, $name);
    4442
    4543  $content = '';
     
    4745    $moduleName = $customize[0];
    4846    if (!$moduleName) {
    49       $moduleName = $lastActionStack->getModuleName();
     47      $moduleName = $context->getActionStack()->getLastEntry()->getModuleName();
    5048    }
    5149    $actionName = '_'.$customize[1];
  • OpenPNE3/trunk/lib/view/sfOpenPNEView.class.php

    r8543 r8553  
    1818      'all' => array(),
    1919    ),
    20     'action' => array(
    21       'all' => array(),
    22     ),
    2320    'target' => array(
    2421      'all' => array(),
     
    3633   * @param array  $categoryNames  Category names
    3734   * @param array  $partsNames     Parts names
    38    * @param array  $actionNames    Action names
    3935   * @param array  $targetNames    Target names
    4036   */
    41   public function setCustomize($attributeName, $moduleName, $templateName, $categoryNames, $partsNames, $actionNames, $targetNames)
     37  public function setCustomize($attributeName, $moduleName, $templateName, $categoryNames, $partsNames, $targetNames)
    4238  {
    4339    if (empty($categoryNames))
     
    6561    }
    6662
    67     if (empty($actionNames))
    68     {
    69       $this->customizeConditions['action']['all'][] = $attributeName;
    70     }
    71     else
    72     {
    73       foreach ($actionNames as $actionName)
    74       {
    75         $this->customizeConditions['action'][$actionName][] = $attributeName;
    76       }
    77     }
    78 
    7963    if (empty($targetNames))
    8064    {
     
    9781   * @param array  $categoryName  A category name
    9882   * @param array  $partsName     A parts name
    99    * @param array  $actionName    An action name
    10083   * @param array  $targetName    A target name
    10184   */
    102   public function getCustomize($categoryName, $partsName, $actionName, $targetName)
     85  public function getCustomize($categoryName, $partsName, $targetName)
    10386  {
    10487    $result = array();
     
    11699    }
    117100
    118     $actionCustomizes = $this->customizeConditions['action']['all'];
    119     if ($actionName && !empty($this->customizeConditions['action'][$actionName]))
    120     {
    121       $actionCustomizes = array_merge($actionCustomizes, $this->customizeConditions['action'][$actionName]);
    122     }
    123 
    124101    $targetCustomizes = $this->customizeConditions['target']['all'];
    125102    if ($targetName && !empty($this->customizeConditions['target'][$targetName]))
     
    128105    }
    129106
    130     $customizes = array_intersect($categoryCustomizes, $partsCustomizes, $actionCustomizes, $targetCustomizes);
     107    $customizes = array_intersect($categoryCustomizes, $partsCustomizes, $targetCustomizes);
    131108    foreach ($customizes as $customize)
    132109    {
Note: See TracChangeset for help on using the changeset viewer.