Merge changesets 2959, 2960, 2961, 2962.

This commit is contained in:
Alexis Lahouze 2011-06-03 12:43:09 +00:00
parent 0825c2665e
commit a6b04ed714
3 changed files with 9 additions and 8 deletions

View File

@ -72,7 +72,7 @@ if (!$_SERVER[HTTPS]) {
</td><td>
<form action="login.php" method="post" target="_top">
<table border="0" style="border: 1px solid #202020;" cellspacing="0" cellpadding="3" width="300px" >
<tr><th colspan="2" align="center">Accès AlternC</th></tr>
<tr><th colspan="2" align="center"><?php __("AlternC access"); ?></th></tr>
<tr><th align="right"><label for="username"><?php echo _("Username"); ?></label></th><td><input type="text" class="int" name="username" id="username" value="" maxlength="128" size="15" /></td></tr>
<tr><th align="right"><label for="password"><?php echo _("Password"); ?></label></th><td><input type="password" class="int" name="password" id="password" value="" maxlength="128" size="15" /></td></tr>
<tr><td colspan="2" align="center"><input type="submit" class="inb" name="submit" value="<?php __("Enter"); ?>" /><input type="hidden" id="restrictip" name="restrictip" value="1" /></td></tr>

View File

@ -70,7 +70,7 @@ if (isset($http_auth) && $http_auth) {
header('HTTP/1.0 401 Unauthorized');
exit();
}
}
}
if (!empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_PW'])) {
// Gruiiik
$_REQUEST["username"]=$_SERVER['PHP_AUTH_USER'];
@ -80,13 +80,13 @@ if (!empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_PW'])) {
$help_baseurl="http://www.aide-alternc.org/";
/* PHPLIB inclusions : */
$root="/var/alternc/bureau/";
/* Server Domain Name */
$host=getenv("HTTP_HOST");
/* Global variables (AlternC configuration) */
require_once($root."class/local.php");
require_once(dirname(__FILE__)."/local.php");
/* PHPLIB inclusions : */
$root=$L_ALTERNC_LOC."/bureau/";
require_once($root."class/db_mysql.php");
require_once($root."class/functions.php");

View File

@ -39,6 +39,7 @@ umask 022
#
DOMAIN_LOG_FILE="/var/log/alternc/update_domains.log"
exec >>"$DOMAIN_LOG_FILE" 2>&1
if [ `whoami` = 'root' ]; then
sudo=""
@ -48,7 +49,7 @@ fi
apache_reload() {
if [ -x /usr/sbin/apache2ctl ]; then
$sudo /usr/sbin/apache2ctl graceful > /dev/null || echo "Cannot restart apache" >> "$DOMAIN_LOG_FILE"
$sudo /usr/sbin/apache2ctl graceful || echo "Cannot restart apache"
fi
}
@ -58,14 +59,14 @@ if [ ! -z "$RELOAD_ZONES" ]; then
for zone in $RELOAD_ZONES; do
case $zone in
"all")
$sudo rndc reload > /dev/null || echo "Cannot reload bind" >> "$DOMAIN_LOG_FILE"
$sudo rndc reload || echo "Cannot reload bind"
apache_reload # keep for compatibility
;;
"apache")
apache_reload
;;
*)
$sudo rndc reload "$zone" > /dev/null || echo "Cannot reload bind for zone $zone" >> "$DOMAIN_LOG_FILE"
$sudo rndc reload "$zone" || echo "Cannot reload bind for zone $zone"
;;
esac
done