Skip to content

Commit

Permalink
Merge branch '47-security'
Browse files Browse the repository at this point in the history
  • Loading branch information
phpfunk committed Jan 14, 2014
2 parents 862c451 + 40ea4dd commit ff318c3
Show file tree
Hide file tree
Showing 17 changed files with 401 additions and 172 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
application/config/database.php
application/logs/*.php
application/controllers/test.php
.DS_Store
.buildpath
.project
2 changes: 1 addition & 1 deletion application/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@
| by the output class. Do not 'echo' any values with compression enabled.
|
*/
$config['compress_output'] = TRUE;
$config['compress_output'] = false;

/*
|--------------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions application/config/migration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
| Enable/Disable Migrations
|--------------------------------------------------------------------------
|
| Migrations are disabled by default but should be enabled
| Migrations are disabled by default but should be enabled
| whenever you intend to do a schema migration.
|
*/
$config['migration_enabled'] = TRUE;
$config['migration_enabled'] = true;


/*
Expand All @@ -21,7 +21,7 @@
| be upgraded / downgraded to.
|
*/
$config['migration_version'] = 2;
$config['migration_version'] = 3;


/*
Expand Down
4 changes: 1 addition & 3 deletions application/controllers/groups.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,7 @@ public function members() {

$data['group']['member_count'] = $this->Groups_model->get_group_members_count($group[0]['id']);
$data['group']['members'] = $this->Groups_model->get_group_members($group[0]['id']);

$invites = $this->db->query("SELECT * FROM groups_invites WHERE groupid = '".$group[0]['id']."' AND status = ''");
$invites = $this->db->query("SELECT * FROM groups_invites WHERE groupid = '".$group[0]['id']."' AND status IS NULL");
if ($invites->num_rows() > 0) {
$data['group']['invites'] = $invites->result_array();
}
Expand All @@ -338,7 +337,6 @@ public function members() {
if ($data['group']['owner'] != $this->session->userdata('userid')) {
show_404($this->uri->uri_string());
}

$this->load->view('groups_members',$data);
}

Expand Down
22 changes: 11 additions & 11 deletions application/controllers/install.php
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Install extends CI_Controller {

public function __construct() {
parent::__construct();

$this->load->helper(array('url','form'));
$this->load->library('session');

$this->load->database(); // Load Database for all methods

}

public function index()
{

// Step one: See if there is a database
$data['install_complete'] = $this->database_install();

Expand All @@ -24,11 +24,11 @@ public function index()

public function database_install()
{

// See if there is a users table
// Also, be sure there _are_ users.
if ( !$this->db->table_exists('users') ) { // No user table

// There is no users table, run migrations to make
// sure that database is up-to-date.
$this->load->library('migration');
Expand All @@ -38,9 +38,9 @@ public function database_install()
show_error($this->migration->error_string());
exit;
}

}

// Make sure there is at least one user
$this->db->from('users');
$number_of_users = $this->db->count_all_results();
Expand All @@ -49,13 +49,13 @@ public function database_install()
return true;
} else {
return false;
}
}

return false;
}

// Used to update from one version to another.
public function upgrade()
public function upgrade()
{
// There is no users table, run migrations to make
// sure that database is up-to-date.
Expand Down
Loading

0 comments on commit ff318c3

Please sign in to comment.