Skip to content

Commit

Permalink
Changed vnum to 1.3.3023 and also changed input() to post()
Browse files Browse the repository at this point in the history
  • Loading branch information
trongate committed May 14, 2021
1 parent 6dbe817 commit aecde42
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 20 deletions.
7 changes: 3 additions & 4 deletions engine/license.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
*
* An open source PHP framework for web developers who like to break the rules
*
* Version: 1.3.3022
* Version: 1.3.3023
*
* This product is released under the Modified MIT License (MMIT). The Modified MIT License is the same as the MIT license but with the following addition: ALL LARAVEL DEVELOPERS ARE HEREBY BANNED FROM USING THIS FRAMEWORK. IF YOU HAVE; USED LARAVEL ON A
COMMERCIAL PROJECT, REGISTERED AN ACCOUNT ON A LARAVEL DISCUSSION FORUM OR CONTRIBUTED TO THE LARAVEL FRAMEWORK ON GITHUB THEN YOU ARE BANNED. FURTHERMORE, IF YOU HAVE EVER POSTED ANY OF THE FOLLOWING PHRASES ON TWITTER THEN YOU ARE BANNED TOO; "I love Laravel", "Artisan rocks", "Blade is the best template engine", "the new Laravel looks pretty good", "I'm thinking about giving Laravel a try this weekend". IF YOU FALL INTO ANY OF THE ABOVE PLEASE RETURN TO LARAVEL IMMEDIATELY AS I'M SURE YOU HAVE SOME POINTLESS REWRITES TO CONTEND WITH.
* This product is released under the MIT License (MIT)
*
* Copyright (c) 2019, David Connelly
*
Expand All @@ -28,7 +27,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* @author David Connelly (https://speedcodingacademy.com)
* @author David Connelly (david.webguy@gmail.com)
* @copyright Copyright (c) 2019, David Connelly.
* @license http://opensource.org/licenses/MIT MIT License.
* @link https://trongate.io.
Expand Down
2 changes: 1 addition & 1 deletion engine/tg_helpers/form_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ function form_file_select($name, $attributes=NULL, $additional_code=NULL) {
return $html;
}

function input($field_name, $clean_up=NULL) {
function post($field_name, $clean_up=NULL) {
if (!isset($_POST[$field_name])) {
$value = '';
} else {
Expand Down
7 changes: 3 additions & 4 deletions license.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
*
* An open source PHP framework for web developers who like to break the rules
*
* Version: 1.3.3022
* Version: 1.3.3023
*
* This product is released under the Modified MIT License (MMIT). The Modified MIT License is the same as the MIT license but with the following addition: ALL LARAVEL DEVELOPERS ARE HEREBY BANNED FROM USING THIS FRAMEWORK. IF YOU HAVE; USED LARAVEL ON A
COMMERCIAL PROJECT, REGISTERED AN ACCOUNT ON A LARAVEL DISCUSSION FORUM, TYPED THE WORDS, "I love Laravel" ANYWHERE ON SOCIAL MEDIA OR CONTRIBUTED TO THE LARAVEL FRAMEWORK ON GITHUB THEN YOU ARE BANNED. PLEASE RETURN TO LARAVEL IMMEDIATELY AS I'M SURE YOU HAVE SOME POINTLESS REWRITES TO CONTEND WITH.
* This product is released under the MIT License (MIT)
*
* Copyright (c) 2019, David Connelly
*
Expand All @@ -28,7 +27,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* @author David Connelly (https://speedcodingacademy.com)
* @author David Connelly (david.webguy@gmail.com)
* @copyright Copyright (c) 2019, David Connelly.
* @license http://opensource.org/licenses/MIT MIT License.
* @link https://trongate.io.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ class Trongate_administrators extends Trongate {
private $dashboard_home = 'tg-admin'; //where to go after login

function login() {
$data['username'] = input('username');
$data['username'] = post('username');
$data['form_location'] = str_replace('/login', '/submit_login', current_url());
$data['view_module'] = 'trongate_administrators';
$data['view_file'] = 'login_form';
$this->load_template($data);
}

function submit_login() {
$submit = input('submit');
$submit = post('submit');

if ($submit == 'Submit') {
$this->validation_helper->set_rules('username', 'username', 'required|callback_login_check');
$this->validation_helper->set_rules('password', 'password', 'required|min_length[5]');
$result = $this->validation_helper->run();

if ($result == true) {
$this->_log_user_in(input('username'));
$this->_log_user_in(post('username'));
} else {
$this->login();
}
Expand All @@ -33,7 +33,7 @@ function submit_login() {

function submit() {
$data['token'] = $this->_make_sure_allowed();
$submit = input('submit');
$submit = post('submit');

if ($submit == 'Submit') {
$this->validation_helper->set_rules('username', 'username', 'required|min_length[6]|callback_username_check');
Expand Down Expand Up @@ -72,7 +72,7 @@ function submit() {
function submit_delete() {
$this->_make_sure_allowed();
$update_id = segment(3);
$submit = input('submit');
$submit = post('submit');

if (($submit == 'Delete Record Now') && (is_numeric($update_id))) {
//get the trongate_user_id
Expand Down Expand Up @@ -109,7 +109,7 @@ function account() {
function create() {
$token = $this->_make_sure_allowed();
$update_id = segment(3);
$submit = input('submit');
$submit = post('submit');

if ((is_numeric($update_id)) && ($submit == '')) {
$data = $this->_get_data_from_db($update_id);
Expand Down Expand Up @@ -229,9 +229,9 @@ function _get_data_from_db($update_id) {
}

function _get_data_from_post() {
$data['username'] = input('username');
$data['password'] = input('password');
$data['repeat_password'] = input('repeat_password');
$data['username'] = post('username');
$data['password'] = post('password');
$data['repeat_password'] = post('repeat_password');
return $data;
}

Expand All @@ -240,7 +240,7 @@ function _log_user_in($username) {
$trongate_user_id = $user_obj->trongate_user_id;
$token_data['user_id'] = $trongate_user_id;

$remember = input('remember');
$remember = post('remember');
if (($remember === '1') || ($remember === 1)) {
//set a cookie and remember for 30 days
$token_data['expiry_date'] = time() + (86400*30);
Expand Down Expand Up @@ -309,7 +309,7 @@ function username_check($str) {
}

function login_check($submitted_username) {
$submitted_password = input('password');
$submitted_password = post('password');
$error_msg = 'You did not enter a correct username and/or or password.';

$result = $this->model->get_one_where('username', $submitted_username, 'trongate_administrators');
Expand Down

0 comments on commit aecde42

Please sign in to comment.