Esempio n. 1
0
 public function conf_perms()
 {
     if (is_writable(INC . "/conf.inc.php")) {
         if (main::perms(INC . "/conf.inc.php", 0444)) {
             main::errors("Configuration File made unwritable.");
         } else {
             main::errors("Failed to make the configuration file unwritable.");
         }
     } else {
         main::errors("Configuration File is already unwritable.");
     }
     echo style::replaceVar('tpl/admin/system/perms-tools.tpl');
 }
Esempio n. 2
0
 public function checkPerms($file)
 {
     if (is_writable($file)) {
         return true;
     } else {
         main::perms($file, 0777);
         if (is_writable($file)) {
             return true;
         } else {
             main::perms($file, 0777);
             return false;
         }
     }
 }
Esempio n. 3
0
    include INC . "/conf.inc.php";
    if (!writeconfig($sql['host'], $sql['user'], $sql['pass'], $sql['db'], $sql['pre'], "false")) {
        $install_array['ANYTHING'] = "Your {$link} isn't writeable or does not exist.  Please make it writable and make sure it exists.";
        $disable = true;
    } else {
        $install_array['ANYTHING'] = "Since you've already ran the installer, your config has been re-written to the \"not installed\" state. If you are upgrading, this is normal!<br>";
    }
}
if (!file_exists($link)) {
    if (!fopen($link, "w+")) {
        $install_array["ANYTHING"] = "Your {$link} file doesn't exist. Please create it as a blank file and make it writable.";
        $disable = true;
    }
}
if (!is_writable($link)) {
    if (!main::perms($link, 0666)) {
        $install_array["ANYTHING"] = "Your {$link} isn't writeable.  Please make it writable.";
        $disable = true;
    }
}
echo style::get("header.tpl");
if ($disable) {
    echo '<script type="text/javascript">$(function(){
$(".twobutton").attr("disabled", "true");$("#method").attr("disabled", "true");}
);</script>';
}
$install_array["GENERATED_URL"] = generateSiteUrl();
echo style::replaceVar("../install/includes/tpl/install.tpl", $install_array);
echo style::get("footer.tpl");
include INC . "/output.php";
//Output it
Esempio n. 4
0
 private function checkPerms($file)
 {
     if (is_writable($file)) {
         if (main::perms($file, 0444)) {
             return "";
         } else {
             return "<div class='warn'><img src='../themes/icons/error.png' alt='' /> Warning: Configuration file (conf.inc.php) is still writable!</div>";
         }
     } else {
         return "";
     }
 }