Single quotes unless extremely necessary
No php short tags.
Instead of <?=
we should use <?php echo
http://stackoverflow.com/questions/1386620/php-echo-vs-php-short-tags/
No inline css styles
Do not change the template_header or template_footer files
Views returned by controllers should be named as
ControllerNameWithouthTheControllerWord_MethodName
I created the current_user helper. It has a getCurrentUserId($controller)
and a isUserLoggedIn($controller)
.
I added the helper to the autoload.php so it can be accessible by everyone.
These functions will be called by each controller that needs to get the current information. Feel free to extend this helper.
Why do we need this helper? Because CodeIgniter does not allow a controller to call another controller functions.
The HomeController
and the SearchController
use these functions
Every commit should have a meaningful message.
Commits should be small.
It would be sane for each one of us to develop our stuff on a "development" separate branch and then merge it to the master once stable.
The best way I found of doing this is first merging the destiny branch (master) into our development branch first.
Conflicts should be solved in the "development" branch.
After the "development" branch is conflict free, it should be merged back to the master branch with a nice commit message
1- Connect to the remote server ussing ssh
2- Enter the website directory
cd /var/www/html/senior-projects/
3- Switch to the master branch. Or any branch you want to publish
sudo git checkout master
4- Download the latest version of the source code
sudo git pull