PluginProbe
CSS & JavaScript Toolbox / 6.0.9
CSS & JavaScript Toolbox v6.0.9
trunk 0.3 0.8 10 10.1 11 11.2 11.3 11.4 11.5 11.6 11.7 11.8 11.9 11.9.1 12 12.0 12.0.1 12.0.3 12.0.4 12.0.5 12.0.6 12.0.7 6.0 6.0.11 All 60 releases
← All changes | framework/mvc/controller.inc.php +9 -2 6.06.0.9 View file →
@@ -103,16 +103,23 @@
103 103 public function __construct($hasView = null, $request = null) {
104 104 // Initialize hookable!
105 105 parent::__construct();
106 106 // Read request parameters.
107 - $this->request = $request ? $request : $_REQUEST;
107 + $this->request = array_merge(((array) $_REQUEST), ((array) $request));
108 108 // Create default model.
109 109 if (isset($this->controllerInfo['model'])) {
110 + // E_ALL complain!
111 + if (!isset($this->controllerInfo['model_file'])) {
112 + $this->controllerInfo['model_file'] = null;
113 + }
110 114 $this->model = CJTModel::create($this->controllerInfo['model'], array(), $this->controllerInfo['model_file']);
111 115 }
112 116 // Create default view.
113 117 if ($hasView === null) { // Default value for $hasView = true
114 - $view = $this->ongetviewname($this->request['view'] ? $this->request['view'] : $this->controllerInfo['view']);
118 + // Request/passed parameters has priority over controller default view!
119 + $view = $this->ongetviewname(isset($this->request['view']) ? $this->request['view'] :
120 + (isset($this->controllerInfo['view']) ? $this->controllerInfo['view'] : null)
121 + );
115 122 if ($view) {
116 123 $this->view = self::getView($view)
117 124 // Push data into view.
118 125 ->setModel($this->model)