Copy now writes XML file. Edit modified to check is_writable instead of is_readable.

This commit is contained in:
Nate Jones
2013-05-04 02:23:32 +00:00
parent c78fbbcdd3
commit 4fee258efe
2 changed files with 9 additions and 1 deletions

View File

@@ -141,6 +141,14 @@ else {
$db->exec(check_sql($sql));
unset($sql);
//synchronize configuration
if (is_writable($_SESSION['switch']['extensions']['dir'])) {
require_once "app/extensions/resources/classes/extension.php";
$ext = new extension;
$ext->xml();
unset($ext);
}
//redirect the user
require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=extensions.php\">\n";

View File

@@ -514,7 +514,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
if (permission_exists('extension_add') || permission_exists('extension_edit')) {
//synchronize configuration
if (is_readable($_SESSION['switch']['extensions']['dir'])) {
if (is_writable($_SESSION['switch']['extensions']['dir'])) {
require_once "app/extensions/resources/classes/extension.php";
$ext = new extension;
$ext->xml();