Commits

Bogdan Savluk  committed 406a9a7

fix for php < 5.3

  • Participants
  • Parent commits 3b12940

Comments (0)

Files changed (2)

File testapp/protected/modules/admin/components/CrudController.php

     public function loadModel($id)
     {
         $class = $this->modelName;
-        $model = call_user_func_array(array(&$class, 'model'), array());
+        $model = CActiveRecord::model($class);
 
 
         $model = $model->findByPk($id);

File testapp/protected/modules/admin/components/StaticDataEditor.php

     {
         $model = new DataModel($this->model);
         $dataModelClass = $this->storageModel;
-        $dataModel = $dataModelClass::model()->findByPk($this->key);
+        $dataModel = CActiveRecord::model($dataModelClass)->findByPk($this->key);
         $model->setAttributes($dataModel->getDataAttributes(), false);
         if (isset($_POST['DataModel'])) {
             $model->setAttributes($_POST['DataModel']);