Changeset 21745


Ignore:
Timestamp:
2012/04/15 10:50:38 (9 years ago)
Author:
AMUAMU
Message:

r21743 の修正により一部の画面でreload処理が正常に動かない場合がある問題の修正

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/data/class/SC_Response.php

    r21743 r21745  
    124124 
    125125        $arrBacktrace = debug_backtrace(); 
    126         if (is_object($arrBacktrace[0]['object'])) { 
     126        if (is_object($arrBacktrace[0]['object']) && method_exists($arrBacktrace[0]['object'], 'getMode')) { 
    127127            $parent_class_name = get_parent_class($arrBacktrace[0]['object']); 
    128128            $objPlugin->doAction($parent_class_name . '_action_' . $arrBacktrace[0]['object']->getMode(), array($arrBacktrace[0]['object'])); 
     
    131131                $objPlugin->doAction($class_name . '_action_' . $arrBacktrace[0]['object']->getMode(), array($this)); 
    132132            } 
     133        } elseif (is_object($arrBacktrace[0]['object'])) { 
     134            $pattern = '/^[a-zA-Z0-9_]+$/'; 
     135            $mode = null; 
     136            if (isset($_GET['mode']) && preg_match($pattern, $_GET['mode'])) { 
     137                $mode =  $_GET['mode']; 
     138            } elseif (isset($_POST['mode']) && preg_match($pattern, $_POST['mode'])) { 
     139                $mode = $_POST['mode']; 
     140            } 
     141            $parent_class_name = get_parent_class($arrBacktrace[0]['object']); 
     142            $objPlugin->doAction($parent_class_name . '_action_' . $mode, array($arrBacktrace[0]['object'])); 
     143            $class_name = get_class($arrBacktrace[0]['object']); 
     144            if ($class_name != $parent_class_name) { 
     145                $objPlugin->doAction($class_name . '_action_' . $mode, array($this)); 
     146            } 
     147 
    133148        } 
    134149 
Note: See TracChangeset for help on using the changeset viewer.