Correction de bugs

Correction d'identations
This commit is contained in:
Alan Garcia 2011-03-06 19:11:49 +00:00
parent 0e60815415
commit d6511ede23
10 changed files with 35 additions and 39 deletions

View File

@ -114,9 +114,7 @@ foreach ($domains as $key => $domain) {
} else {
# 2.1 keep a copy of where it was, in an SQL request
$backup .= "UPDATE `sub_domaines` SET `type`='$type', valeur='$dest' WHERE `domaine`='$domain' AND sub='$sub';\n";
$backup .= "DELETE FROM `sub_domaines_standby` WHERE domaine='$domain' and sub='$sub';\n";
$backup .= "INSERT INTO sub_domaines_standby (compte,domaine,sub,valeur,type,action) values ('$cuid','$domain','$sub','$dest','$type',1);\n"; // UPDATE
$backup .= "UPDATE `sub_domaines` SET `type`='$type', valeur='$dest',web_action='UPDATE' WHERE `domaine`='$domain' AND sub='$sub';\n";
# 2.2 change the subdomain to redirect to http://spam.koumbit.org/
$dom->lock();

View File

@ -11,11 +11,23 @@ ScriptAlias /cgi-bin/ /var/alternc/cgi-bin/
AddHandler cgi-script .cgi
</Directory>
<Directory /var/alternc>
Order allow,deny
Allow from none
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/alternc/bureau>
Order allow,deny
Allow from all
php_admin_flag safe_mode_gid off
php_admin_flag safe_mode off
php_admin_flag register_globals on
AddDefaultCharset ISO-8859-1
php_admin_value open_basedir /etc/alternc/:/var/run/alternc/:/var/alternc/bureau/:/var/alternc/html/:/var/alternc/tmp:/tmp:/usr/share/php/:/var/cache/alternc-webalizer/
</Directory>
<Directory /var/alternc/html>
AllowOverride AuthConfig FileInfo Limit Options Indexes
Options Indexes Includes FollowSymLinks MultiViews

View File

@ -5,21 +5,6 @@
alias /admin/sql /usr/share/phpmyadmin
alias /webmail /usr/share/squirrelmail
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/alternc/bureau>
Order allow,deny
Allow from all
php_admin_flag safe_mode_gid off
php_admin_flag safe_mode off
php_admin_flag register_globals on
AddDefaultCharset ISO-8859-1
php_admin_value open_basedir /etc/alternc/:/var/run/alternc/:/var/alternc/bureau/:/var/alternc/html/:/var/alternc/tmp:/tmp:/usr/share/php/:/var/cache/alternc-webalizer/
</Directory>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T %{Host}i" alternc
CustomLog /var/log/apache2/access.log alternc
</VirtualHost>

View File

@ -162,7 +162,8 @@ host_change_enable() {
}
host_delete() {
local FQDN=$1
local VTYPE=$1
local FQDN=$2
# Execute post-install hooks
launch_hooks "delete" "$1" "$2" "$3" "$4"
if [ $? -gt 10 ] ; then

View File

@ -76,7 +76,7 @@ MYSQL_UNREACHABLE_DATABASE=`$printf "$($gettext "Cannot access accounts database
# Have to get AlternC conf file :
! [ -f "$ALTERNC_CONF_FILE" ] && { echo $MISSING_CONF_FILE ; exit 1 ; } || . $ALTERNC_CONF_FILE
mysql="$mysql --defaults-file=/etc/alternc/my.cnf"
$mysql -e "select count(*) from domaines_standby;" > /dev/null 2>&1
$mysql -e "desc domaines;" > /dev/null 2>&1
[ "$?" != 0 ] && { echo "$MYSQL_UNREACHABLE_DATABASE" ; exit 1 ; }
# Does the stuff

View File

@ -75,7 +75,7 @@ MYSQL_UNREACHABLE_DATABASE=`$printf "$($gettext "Cannot access accounts database
! [ -f "$ALTERNC_CONF_FILE" ] && { echo $MISSING_CONF_FILE ; exit 1 ; } || . $ALTERNC_CONF_FILE
# Must have access to mysql to retreive accounts owning domains :
mysql="$mysql --defaults-file=/etc/alternc/my.cnf -B -N -e"
$mysql "select count(*) from domaines_standby;" > /dev/null 2>&1
$mysql "desc domaines;" > /dev/null 2>&1
[ "$?" != 0 ] && { echo "$MYSQL_UNREACHABLE_DATABASE" ; exit 1 ; }
# Does the stuff

View File

@ -169,7 +169,7 @@ LOG_FILE=$LOG_DIR/access.log
[ -f "$ALTERNC_CONF_FILE" ] || { echo $MISSING_CONF_FILE ; exit 1 ; } && . $ALTERNC_CONF_FILE
# Must have access to mysql to retreive accounts owning domains :
mysql="$mysql --defaults-file=/etc/alternc/my.cnf -B -N -e"
$mysql "select count(*) from domaines_standby;" > /dev/null 2>&1
$mysql "desc domaines;" > /dev/null 2>&1
[ "$?" != 0 ] && { echo "$MYSQL_UNREACHABLE_DATABASE" ; exit 1 ; }
# Prevents executing more than one shell at the same time
$lockfilecreate --retry 1 $LOCK_FILE