Delete the group permissions before restoring them.
This commit is contained in:
@@ -27,11 +27,30 @@
|
|||||||
//define the permission class
|
//define the permission class
|
||||||
class permission {
|
class permission {
|
||||||
|
|
||||||
|
//delete the permissions
|
||||||
|
function delete() {
|
||||||
|
//set the variables
|
||||||
|
$db = $this->db;
|
||||||
|
//delete the group permisisons
|
||||||
|
$sql = "delete from v_group_permissions ";
|
||||||
|
if (!$db->exec($sql)) {
|
||||||
|
//echo $db->errorCode() . "<br>";
|
||||||
|
$info = $db->errorInfo();
|
||||||
|
print_r($info);
|
||||||
|
// $info[0] == $db->errorCode() unified error code
|
||||||
|
// $info[1] is the driver specific error code
|
||||||
|
// $info[2] is the driver specific error string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//restore the permissions
|
//restore the permissions
|
||||||
function restore() {
|
function restore() {
|
||||||
//set the variables
|
//set the variables
|
||||||
$db = $this->db;
|
$db = $this->db;
|
||||||
|
|
||||||
|
//delete the group permisisons
|
||||||
|
$this-delete();
|
||||||
|
|
||||||
//get the $apps array from the installed apps from the core and mod directories
|
//get the $apps array from the installed apps from the core and mod directories
|
||||||
$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_config.php");
|
$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_config.php");
|
||||||
$x=0;
|
$x=0;
|
||||||
|
|||||||
Reference in New Issue
Block a user