Delete the group permissions before restoring them.
This commit is contained in:
parent
1b1738ed3f
commit
ae62c8600c
|
|
@ -27,11 +27,30 @@
|
|||
//define the permission class
|
||||
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
|
||||
function restore() {
|
||||
//set the variables
|
||||
$db = $this->db;
|
||||
|
||||
//delete the group permisisons
|
||||
$this-delete();
|
||||
|
||||
//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");
|
||||
$x=0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue