Permalink
Browse files

Merge branch 'feature/revert-post-key-exists' into develop

  • Loading branch information...
2 parents 9d91617 + 2708157 commit 3ffe38ce4dc695148d72cddf106e403051d06268 @sourcejedi sourcejedi committed Mar 22, 2013
@@ -316,7 +316,7 @@ private function _get_activity($which='activity_user',$find_value=FALSE)
$find_value = ($this->input->post($which.'_select') == '') ? $this->uri->segment(5) : $this->input->post($which.'_select');
}
- if ($this->input->post('delete'))
+ if (isset($_POST['delete']))
{
$this->_delete_activity($which, $find_value);
}
@@ -114,7 +114,7 @@ public function create_context()
Template::set('roles', $roles);
// Form submittal?
- if ($this->input->post('build'))
+ if (isset($_POST['build']))
{
$this->form_validation->set_rules('context_name', 'Context Name', 'required|trim|alpha_numeric|xss_clean');
@@ -173,7 +173,7 @@ public function create_module($fields = 0)
{
Template::set('field_total', $this->field_total);
- if ($this->input->post('build'))
+ if (isset($_POST['build']))
{
Template::set('form_error', TRUE);
}
@@ -73,7 +73,7 @@ public function index()
if ($db_required != '') {
$mb_index .= "
// Deleting anything?
- if (\$this->input->post('delete'))
+ if (isset(\$_POST['delete']))
{
\$checked = \$this->input->post('checked');
@@ -152,7 +152,7 @@ public function create()
";
if ($db_required != '') {
$mb_create .= "
- if (\$this->input->post('save'))
+ if (isset(\$_POST['save']))
{
if (\$insert_id = \$this->save_".$module_name_lower."())
{
@@ -201,7 +201,7 @@ public function edit()
";
if ($db_required != '') {
$mb_edit .= "
- if (\$this->input->post('save'))
+ if (isset(\$_POST['save']))
{
\$this->auth->restrict('{edit_permission}');
@@ -220,7 +220,7 @@ public function edit()
if (in_array('delete', $action_names)) {
$mb_edit .= "
- else if (\$this->input->post('delete'))
+ else if (isset(\$_POST['delete']))
{
\$this->auth->restrict('{delete_permission}');
@@ -74,7 +74,7 @@ public function index()
$hide_form = FALSE;
// Are we performing an action?
- if ($this->input->post('action'))
+ if (isset($_POST['action']))
{
$checked = $this->input->post('checked');
@@ -154,7 +154,7 @@ public function browse($table = '')
*/
public function backups()
{
- if ($this->input->post('delete'))
+ if (isset($_POST['delete']))
{
$checked = $this->input->post('checked');
@@ -209,7 +209,7 @@ public function backup($tables=null)
Template::set('toolbar_title', 'Create New Backup');
return TRUE;
}
- else if ($this->input->post('backup'))
+ else if (isset($_POST['backup']))
{
$this->load->library('form_validation');
@@ -315,7 +315,7 @@ public function restore($filename=null)
{
Template::set('filename', $filename);
- if (!empty($filename) && $this->input->post('restore'))
+ if (!empty($filename) && isset($_POST['restore']))
{
// Load the file from disk.
$this->load->helper('file');
@@ -62,7 +62,7 @@ public function index()
{
$this->load->library('form_validation');
- if ($this->input->post('save'))
+ if (isset($_POST['save']))
{
$this->form_validation->set_rules('sender_email', 'System Email', 'required|trim|valid_email|max_length[120]');
$this->form_validation->set_rules('protocol', 'Email Server', 'trim');
@@ -138,7 +138,7 @@ public function index()
*/
public function template()
{
- if ($this->input->post('save'))
+ if (isset($_POST['save']))
{
$header = $_POST['header'];
$footer = $_POST['footer'];
@@ -189,7 +189,7 @@ public function emails()
*/
public function test()
{
- if (!$this->input->post('test'))
+ if (!isset($_POST['test']))
{
$this->security->csrf_show_error();
}
@@ -229,7 +229,7 @@ public function queue()
$this->load->model('Emailer_model', 'emailer_model', TRUE);
// Deleting anything?
- if ($this->input->post('delete'))
+ if (isset($_POST['delete']))
{
$checked = $this->input->post('checked');
if (is_array($checked) && count($checked))
@@ -254,7 +254,7 @@ public function queue()
Template::set_message(sprintf(lang('em_delete_error'), $this->emailer_model->error), 'error');
}
}
- elseif ($this->input->post('force_process'))
+ elseif (isset($_POST['force_process']))
{
$this->load->library('emailer');
$this->emailer->enable_debug(TRUE);
@@ -269,7 +269,7 @@ public function queue()
Template::set('email_debug', $this->emailer->debug_message);
}
}
- elseif ($this->input->post('insert_test'))
+ elseif (isset($_POST['insert_test']))
{
$this->load->library('emailer');
@@ -344,7 +344,7 @@ public function create()
$this->load->model('users/user_model');
$this->load->library('emailer');
- if ($this->input->post('create'))
+ if (isset($_POST['create']))
{
// validate subject, content and recipients
$this->form_validation->set_rules('email_subject', 'Email Subject', 'required|trim|min_length[1]|max_length[255]');
@@ -67,7 +67,7 @@ public function index()
$this->load->helper('file');
// Are we doing bulk actions?
- if ($this->input->post('delete'))
+ if (isset($_POST['delete']))
{
$this->auth->restrict('Bonfire.Logs.Manage');
@@ -85,7 +85,7 @@ public function index()
Template::set_message(sprintf(lang('log_deleted'), count($checked)), 'success');
}
}
- elseif ($this->input->post('delete_all'))
+ elseif (isset($_POST['delete_all']))
{
$this->auth->restrict('Bonfire.Logs.Manage');
@@ -155,7 +155,7 @@ public function enable()
{
$this->auth->restrict('Bonfire.Logs.Manage');
- if ($this->input->post('save'))
+ if (isset($_POST['save']))
{
$this->load->helper('config_file');
@@ -60,7 +60,7 @@ public function __construct()
*/
public function index()
{
- if ($this->input->post('migrate'))
+ if (isset($_POST['migrate']))
{
$core = $this->input->post('core_only') ? '' : 'app_';
@@ -65,7 +65,7 @@ function __construct()
function index()
{
// Deleting anything?
- if ($this->input->post('delete'))
+ if (isset($_POST['delete']))
{
$checked = $this->input->post('checked');
@@ -126,7 +126,7 @@ function index()
*/
public function create()
{
- if ($this->input->post('save'))
+ if (isset($_POST['save']))
{
if ($this->save_permissions())
{
@@ -160,7 +160,7 @@ public function edit()
redirect(SITE_AREA .'/settings/permissions');
}
- if ($this->input->post('save'))
+ if (isset($_POST['save']))
{
if ($this->save_permissions('update', $id))
{
@@ -96,7 +96,7 @@ public function create()
{
$this->auth->restrict('Bonfire.Roles.Add');
- if ($this->input->post('save'))
+ if (isset($_POST['save']))
{
if ($this->save_role())
{
@@ -138,7 +138,7 @@ public function edit()
redirect(SITE_AREA .'/settings/roles');
}
- if ($this->input->post('save'))
+ if (isset($_POST['save']))
{
if ($this->save_role('update', $id))
{
@@ -150,7 +150,7 @@ public function edit()
Template::set_message('There was a problem saving the role: '. $this->role_model->error);
}
}
- elseif ($this->input->post('delete'))
+ elseif (isset($_POST['delete']))
{
if ($this->role_model->delete($id))
{
@@ -64,7 +64,7 @@ public function __construct()
*/
public function index()
{
- if ($this->input->post('save'))
+ if (isset($_POST['save']))
{
if ($this->save_settings())
{
@@ -80,7 +80,7 @@ public function index($trans_lang='english')
Assets::add_module_js('translate', 'translate.js');
// Selecting a different language?
- if ($this->input->post('select_lang'))
+ if (isset($_POST['select_lang']))
{
$trans_lang = $this->input->post('trans_lang');
@@ -126,7 +126,7 @@ public function edit($trans_lang='', $lang_file='')
Assets::add_module_js('translate', 'translate.js');
// Save the file...
- if ($lang_file && $this->input->post('save'))
+ if ($lang_file && isset($_POST['save']))
{
if (save_lang_file($lang_file, $trans_lang, $_POST['lang']))
{
@@ -168,7 +168,7 @@ public function edit($trans_lang='', $lang_file='')
*/
public function export()
{
- if ($this->input->post('export'))
+ if (isset($_POST['export']))
{
$language = $this->input->post('export_lang');
$this->do_export($language, $this->input->post('include_core'), $this->input->post('include_custom'));
@@ -62,7 +62,7 @@ public function __construct()
*/
public function index()
{
- if ($this->input->post('add_shortcut'))
+ if (isset($_POST['add_shortcut']))
{
if ($this->add())
{
@@ -73,7 +73,7 @@ public function index()
Template::set_message(lang('ui_shortcut_add_error'), 'error');
}
}
- elseif ($this->input->post('remove_shortcut'))
+ elseif (isset($_POST['remove_shortcut']))
{
if ($this->remove())
{
@@ -84,7 +84,7 @@ public function index()
Template::set_message(lang('ui_shortcut_remove_error'), 'error');
}
}
- elseif ($this->input->post('save'))
+ elseif (isset($_POST['save']))
{
if ($this->save_settings())
{
@@ -202,7 +202,7 @@ private function save_settings($settings = array())
// set_value("shortcut[$action]") is not supported
foreach ($available_actions as $action => $shortcut)
{
- if ($this->input->post("shortcut_$action"))
+ if (isset($_POST["shortcut_$action"]))
{
$this->form_validation->set_rules("shortcut_$action", lang('ui_shortcuts'), 'required|callback__validate_shortcuts');
@@ -73,12 +73,12 @@ public function index($offset=0)
Template::set('roles', $ordered_roles);
// Do we have any actions?
- if ($this->input->post('activate')) $action = '_activate';
- if ($this->input->post('deactivate')) $action = '_deactivate';
- if ($this->input->post('ban')) $action = '_ban';
- if ($this->input->post('delete')) $action = '_delete';
- if ($this->input->post('purge')) $action = '_purge';
- if ($this->input->post('restore')) $action = '_restore';
+ if (isset($_POST['activate'])) $action = '_activate';
+ if (isset($_POST['deactivate'])) $action = '_deactivate';
+ if (isset($_POST['ban'])) $action = '_ban';
+ if (isset($_POST['delete'])) $action = '_delete';
+ if (isset($_POST['purge'])) $action = '_purge';
+ if (isset($_POST['restore'])) $action = '_restore';
if (isset($action))
{
@@ -192,7 +192,7 @@ public function create()
$meta_fields = config_item('user_meta_fields');
Template::set('meta_fields', $meta_fields);
- if ($this->input->post('save'))
+ if (isset($_POST['save']))
{
if ($id = $this->save_user('insert', NULL, $meta_fields))
{
@@ -260,7 +260,7 @@ public function edit($user_id='')
$user = $this->user_model->find_user_and_meta($user_id);
- if ($this->input->post('save'))
+ if (isset($_POST['save']))
{
if ($this->save_user('update', $user_id, $meta_fields, $user->role_name))
{
Oops, something went wrong.

0 comments on commit 3ffe38c

Please sign in to comment.