This commit is contained in:
nikolark committed 2016-08-17 00:03:33 +02:00
commit 41694a15cb
10 files changed
+17 -53

No files matched your search

+1 -1
View File
@@ -17,7 +17,7 @@ class ActionGroupRelationship {
$this->__construct($action_id, $group_id); $this->__construct($action_id, $group_id);
} }
public function __construct($action_id = NULL, $group_id = NULL){ public function __construct($action_id = NULL, $group_id = NULL){
$this->conn =& DB_connect(); $this->conn = db_connect();
$this->action_id = $action_id; $this->action_id = $action_id;
$this->group_id = $group_id; $this->group_id = $group_id;
+2 -8
View File
@@ -9,13 +9,7 @@ class ActionGroupRelationships {
} }
function __construct(){ function __construct(){
$conn =& DB::connect(getDSN()); $this->conn = db_connect();
if (DB::isError($conn)){
error("ActionGroupRelationships: " . $conn->toString());
exit();
}else {
$this->conn = $conn;
}
} }
public function getJoinedList($group_id, $type = "array", $exclude = 1){ public function getJoinedList($group_id, $type = "array", $exclude = 1){
@@ -85,4 +79,4 @@ class ActionGroupRelationships {
} }
} }
?> ?>
+2 -8
View File
@@ -9,13 +9,7 @@ class Actions {
} }
function __construct(){ function __construct(){
$conn =& DB::connect(getDSN()); $this->conn = db_connect();
if (DB::isError($conn)){
error("Actions: " . $conn->toString());
exit();
}else {
$this->conn = $conn;
}
$sql = "SELECT id, name $sql = "SELECT id, name
FROM din_action FROM din_action
@@ -53,4 +47,4 @@ class Actions {
} }
} }
?> ?>
+1 -1
View File
@@ -39,4 +39,4 @@ class DocumentCategories {
} }
} }
?> ?>
+2 -8
View File
@@ -20,13 +20,7 @@ class Group {
} }
public function __construct($id = NULL, $data = NULL){ public function __construct($id = NULL, $data = NULL){
$conn =& DB::connect(getDSN()); $this->conn = db_connect();
if (DB::isError($conn)){
print("error: ".$conn->toString());
exit();
}else {
$this->conn = $conn;
}
$this->id = $id; $this->id = $id;
@@ -184,4 +178,4 @@ class Group {
} }
} }
?> ?>
+1 -7
View File
@@ -9,13 +9,7 @@ class Groups {
} }
function __construct($restriction = NULL){ function __construct($restriction = NULL){
$conn =& DB::connect(getDSN()); $this->conn = db_connect();
if (DB::isError($conn)){
error("Groups: " . $conn->toString());
exit();
}else {
$this->conn = $conn;
}
if (!checkAuth("view-protected-users")){ if (!checkAuth("view-protected-users")){
$condition = "AND id != 1"; $condition = "AND id != 1";
+2 -8
View File
@@ -9,13 +9,7 @@ class JobCategories {
} }
function __construct(){ function __construct(){
$conn =& DB::connect(getDSN()); $this->conn = db_connect();
if (DB::isError($conn)){
error("JobCategories: " . $conn->toString());
exit();
}else {
$this->conn = $conn;
}
$sql = "SELECT id, title FROM din_jobcategory"; $sql = "SELECT id, title FROM din_jobcategory";
$result = $this->conn->query($sql); $result = $this->conn->query($sql);
@@ -44,4 +38,4 @@ class JobCategories {
print(" </table>"); print(" </table>");
} }
} }
?> ?>
+2 -8
View File
@@ -9,13 +9,7 @@ class UserGroupRelationships {
} }
function __construct(){ function __construct(){
$conn =& DB::connect(getDSN()); $this->conn = db_connect();
if (DB::isError($conn)){
error("UserGroupRelationships: " . $conn->toString());
exit();
}else {
$this->conn = $conn;
}
} }
public function getJoinedList($group_id, $type = "array"){ public function getJoinedList($group_id, $type = "array"){
@@ -76,4 +70,4 @@ class UserGroupRelationships {
} }
} }
?> ?>
+1 -1
View File
@@ -3,7 +3,7 @@
require_once "includes.php"; require_once "includes.php";
$conn =& DB_connect(); $conn = db_connect();
$id = $_GET['id']; $id = $_GET['id'];
+3 -3
View File
@@ -3,10 +3,10 @@ header("Content-type: Text/plain");
require_once "includes.php"; require_once "includes.php";
$conn = & DB :: connect(getDSN()); $conn = db_connect();
if (DB :: isError($conn)) { if (DB :: isError($conn)) {
print ("error: " . $conn->toString()); print ("error: " . $conn->toString());
exit (); exit();
} }
$i = 0; $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";