goFrendiAsgard / No-CMS

No-CMS, A CodeIgniter Based CMS Framework
299 stars 199 forks source link

CI 2.x old class/file naming convention implementation #82

Closed ivantcholakov closed 10 years ago

ivantcholakov commented 10 years ago

The idea is about using CodeIgniter 3.0 with supporting the new strict "ucfirst" class/file naming convention, and at the same time supporting the old non-strict class/file naming convention from CodeIgniter 2.0. This is for making transition to CodeIgniter 3.0 easier, without need for name modifications of the current libraries, models and controllers.

Preliminary info: https://www.facebook.com/nocms/posts/453700948083783

When this issue started: https://github.com/EllisLab/CodeIgniter/commit/20292311636837e120d205e470e41826820feb46

The goal at the moment is unblocking No-CMS for upgrade to the latest CodeIgniter 3.0-dev.

Information about the efforts so far in this regard:

https://github.com/goFrendiAsgard/No-CMS/blob/master/developer-note.md#how-to-make-no-cms (the last three steps)

A possible solution:

https://github.com/goFrendiAsgard/No-CMS/commit/211d9b5bfa6b507686f65ecf83ab5a88962107d1 https://github.com/goFrendiAsgard/No-CMS/commit/097a0042bc4c1a0244136e97be59332b68152e1a

"However, some model doesn't loaded as expected (I have a model inside a module without icfirst file name)" - This is to be tested, which I am going to do.

ivantcholakov commented 10 years ago

I'll make a pull request soon.

ivantcholakov commented 10 years ago

https://github.com/goFrendiAsgard/No-CMS/pull/83

goFrendiAsgard commented 10 years ago

Thanks. It seems good. I was surprised seeing MY_CodeIgniter.php. But then, I find this changes in index.php

-require_once BASEPATH.'core/CodeIgniter.php';
 +require_once APPPATH.'core/MY_CodeIgniter.php';

This is genius :+1:

I'll check the code again before merge this to master branch.

goFrendiAsgard commented 10 years ago

This has been merged to master branch