php7 fixes (assign by ref)
This commit is contained in:
1 parent
4f7ae485b3
commit
c1eba34009
12 files changed
+19
-73
No files matched your search
@@ -17,7 +17,7 @@ class ActionGroupRelationship {
|
||||
$this->__construct($action_id, $group_id);
|
||||
}
|
||||
public function __construct($action_id = NULL, $group_id = NULL){
|
||||
$this->conn =& DB_connect();
|
||||
$this->conn = db_connect();
|
||||
|
||||
$this->action_id = $action_id;
|
||||
$this->group_id = $group_id;
|
||||
|
||||
@@ -9,13 +9,7 @@ class ActionGroupRelationships {
|
||||
}
|
||||
|
||||
function __construct(){
|
||||
$conn =& DB::connect(getDSN());
|
||||
if (DB::isError($conn)){
|
||||
error("ActionGroupRelationships: " . $conn->toString());
|
||||
exit();
|
||||
}else {
|
||||
$this->conn = $conn;
|
||||
}
|
||||
$this->conn = db_connect();
|
||||
}
|
||||
|
||||
public function getJoinedList($group_id, $type = "array", $exclude = 1){
|
||||
@@ -85,4 +79,4 @@ class ActionGroupRelationships {
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
?>
|
||||
+2
-8
@@ -9,13 +9,7 @@ class Actions {
|
||||
}
|
||||
|
||||
function __construct(){
|
||||
$conn =& DB::connect(getDSN());
|
||||
if (DB::isError($conn)){
|
||||
error("Actions: " . $conn->toString());
|
||||
exit();
|
||||
}else {
|
||||
$this->conn = $conn;
|
||||
}
|
||||
$this->conn = db_connect();
|
||||
|
||||
$sql = "SELECT id, name
|
||||
FROM din_action
|
||||
@@ -53,4 +47,4 @@ class Actions {
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
?>
|
||||
@@ -9,13 +9,7 @@ class DocumentCategories {
|
||||
}
|
||||
|
||||
function __construct(){
|
||||
$conn =& DB::connect(getDSN());
|
||||
if (DB::isError($conn)){
|
||||
error("DocumentCategories: " . $conn->toString());
|
||||
exit();
|
||||
}else {
|
||||
$this->conn = $conn;
|
||||
}
|
||||
$this->conn = $conn;
|
||||
|
||||
$sql = "SELECT id, title FROM din_documentcategory ORDER BY title ASC";
|
||||
$result = $this->conn->query($sql);
|
||||
|
||||
+2
-8
@@ -20,13 +20,7 @@ class Group {
|
||||
}
|
||||
|
||||
public function __construct($id = NULL, $data = NULL){
|
||||
$conn =& DB::connect(getDSN());
|
||||
if (DB::isError($conn)){
|
||||
print("error: ".$conn->toString());
|
||||
exit();
|
||||
}else {
|
||||
$this->conn = $conn;
|
||||
}
|
||||
$this->conn = db_connect();
|
||||
|
||||
$this->id = $id;
|
||||
|
||||
@@ -184,4 +178,4 @@ class Group {
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
+1
-7
@@ -9,13 +9,7 @@ class Groups {
|
||||
}
|
||||
|
||||
function __construct($restriction = NULL){
|
||||
$conn =& DB::connect(getDSN());
|
||||
if (DB::isError($conn)){
|
||||
error("Groups: " . $conn->toString());
|
||||
exit();
|
||||
}else {
|
||||
$this->conn = $conn;
|
||||
}
|
||||
$this->conn = db_connect();
|
||||
|
||||
if (!checkAuth("view-protected-users")){
|
||||
$condition = "AND id != 1";
|
||||
|
||||
@@ -9,13 +9,7 @@ class JobCategories {
|
||||
}
|
||||
|
||||
function __construct(){
|
||||
$conn =& DB::connect(getDSN());
|
||||
if (DB::isError($conn)){
|
||||
error("JobCategories: " . $conn->toString());
|
||||
exit();
|
||||
}else {
|
||||
$this->conn = $conn;
|
||||
}
|
||||
$this->conn = db_connect();
|
||||
|
||||
$sql = "SELECT id, title FROM din_jobcategory";
|
||||
$result = $this->conn->query($sql);
|
||||
@@ -44,4 +38,4 @@ class JobCategories {
|
||||
print(" </table>");
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
+1
-7
@@ -41,13 +41,7 @@ class User {
|
||||
}
|
||||
|
||||
public function __construct($id, $data = NULL) {
|
||||
$conn = & DB :: connect(getDSN());
|
||||
if (DB :: isError($conn)) {
|
||||
print ("error: " . $conn->toString());
|
||||
exit ();
|
||||
} else {
|
||||
$this->conn = $conn;
|
||||
}
|
||||
$this->conn = db_connect();
|
||||
|
||||
$action = scriptParam("action");
|
||||
$this->id = $id;
|
||||
|
||||
@@ -20,13 +20,7 @@ class UserGroupRelationship {
|
||||
public
|
||||
function __construct($user_id = NULL, $group_id = NULL) {
|
||||
|
||||
$conn = & DB :: connect(getDSN());
|
||||
if (DB :: isError($conn)) {
|
||||
print ("error: ".$conn->toString());
|
||||
exit ();
|
||||
} else {
|
||||
$this->conn = $conn;
|
||||
}
|
||||
$this->conn = db_connect();
|
||||
|
||||
$this->user_id = $user_id;
|
||||
$this->group_id = $group_id;
|
||||
|
||||
@@ -9,13 +9,7 @@ class UserGroupRelationships {
|
||||
}
|
||||
|
||||
function __construct(){
|
||||
$conn =& DB::connect(getDSN());
|
||||
if (DB::isError($conn)){
|
||||
error("UserGroupRelationships: " . $conn->toString());
|
||||
exit();
|
||||
}else {
|
||||
$this->conn = $conn;
|
||||
}
|
||||
$this->conn = db_connect();
|
||||
}
|
||||
|
||||
public function getJoinedList($group_id, $type = "array"){
|
||||
@@ -76,4 +70,4 @@ class UserGroupRelationships {
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
?>
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
require_once "includes.php";
|
||||
|
||||
|
||||
$conn =& DB_connect();
|
||||
$conn = db_connect();
|
||||
|
||||
$id = $_GET['id'];
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@ header("Content-type: Text/plain");
|
||||
|
||||
require_once "includes.php";
|
||||
|
||||
$conn = & DB :: connect(getDSN());
|
||||
$conn = db_connect();
|
||||
if (DB :: isError($conn)) {
|
||||
print ("error: " . $conn->toString());
|
||||
exit ();
|
||||
exit();
|
||||
}
|
||||
|
||||
$i = 0;
|
||||
@@ -98,4 +98,4 @@ if (DB :: isError($result) != true) {
|
||||
}
|
||||
}
|
||||
|
||||
print "\n\nInsert $i rows\nUpdated $u rows";
|
||||
print "\n\nInsert $i rows\nUpdated $u rows";
|
||||
Reference in new issue
Block a user