Author Topic: bug in tinymvc_load.php (model alway load )  (Read 953 times)

ahoangphuc

  • Newbie
  • *
  • Posts: 1
    • View Profile
bug in tinymvc_load.php (model alway load )
« on: May 06, 2012, 01:08:42 pm »
file: tynymvc/sysfiles/plugins/tinymvc_load.php

/* model already loaded? silently skip */
   if(isset($this->$model_alias))
    {
        return true;
    }

=>  i realize model always load, "$this->$model_alias" is not right.

Should as:
/*if(isset($this->$model_alias))
    {
        return true;
        //remove this code
    }*/
     
    /* get instance of controller object */
    $controller = tmvc::instance(null,'controller');
   
     /* library already loaded? silently skip */
    if(isset($controller->$model_alias))
      return true //add code for already loaded



mohrt

  • Administrator
  • Sr. Member
  • *****
  • Posts: 275
    • View Profile
Re: bug in tinymvc_load.php (model alway load )
« Reply #1 on: May 06, 2012, 02:00:53 pm »
It is already this way in the SVN repository. What version are you using?