Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #338

Merged
merged 2 commits into from
Dec 30, 2013
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fixed Models not loading due to case sensitivity
  • Loading branch information
umrysh committed Dec 30, 2013
commit 74cda7b4237807c7adbe388db0e83cd5c3796567
4 changes: 2 additions & 2 deletions application/libs/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ function __construct()
*/
public function loadModel($name)
{
$path = MODELS_PATH . $name . '_model.php';
$path = MODELS_PATH . strtolower($name) . '_model.php';

if (file_exists($path)) {
require MODELS_PATH . $name . '_model.php';
require MODELS_PATH . strtolower($name) . '_model.php';
// The "Model" has a capital letter as this is the second part of the model class name,
// all models have names like "LoginModel"
$modelName = $name . 'Model';
Expand Down