Delete the group permissions before restoring them.

This commit is contained in:
Mark Crane
2014-12-26 06:53:27 +00:00
parent fe908f93ee
commit 70ff399206

View File

@@ -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;