Skip to content

Commit

Permalink
Remove deprecated constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
apmuthu committed Apr 22, 2018
1 parent 019c826 commit 0ce4119
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ajaxCRUD.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ class ajaxCRUD{

// Constructor
//by default ajaxCRUD assumes all necessary files are in the same dir as the script calling it (eg $ajaxcrud_root = "")
function ajaxCRUD($item, $db_table, $db_table_pk, $ajaxcrud_root = "") {
function __construct($item, $db_table, $db_table_pk, $ajaxcrud_root = "") {

//global variable - for allowing multiple ajaxCRUD tables on one page
global $num_ajaxCRUD_tables_instantiated;
Expand Down Expand Up @@ -1066,6 +1066,7 @@ function doAction($action){
}//if POST parameter 'table' == db_table
}//action = add

//this code is for POST requests (i.e. non-ajax updates)
if ($action == 'update' && $_REQUEST['field_name'] != "" && $_REQUEST['id'] != ""){

if ($_REQUEST['table'] == $this->db_table){//added this conditional in v8.5 to account for multiple tables
Expand Down

0 comments on commit 0ce4119

Please sign in to comment.