diff --git a/.gitattributes b/.gitattributes
index a57a8bcb..5cdc900d 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -615,7 +615,6 @@ roundcube/class/m_roundcube.php -text
roundcube/roundcube-install -text
roundcube/roundcube_alternc_logo.png -text
roundcube/templates/apache2/roundcube.conf -text
-roundcube/templates/logrotate.d/roundcube-core -text
roundcube/templates/roundcube/main.inc.php -text
roundcube/templates/roundcube/plugins/managesieve/config.inc.php -text
roundcube/templates/roundcube/plugins/password/config.inc.php -text
diff --git a/bureau/admin/hta_del.php b/bureau/admin/hta_del.php
index 52ffe975..48a7e9ea 100644
--- a/bureau/admin/hta_del.php
+++ b/bureau/admin/hta_del.php
@@ -35,11 +35,12 @@ reset($_POST);
while (list($key,$val)=each($_POST)) {
if (substr($key,0,4)=="del_") {
// Effacement du dossier $val
- $r=$hta->DelDir($val);
- if (!$r) {
- $error.=$err->errstr()."
";
+// $r=$hta->DelDir($val);
+ $return = $hta->DelDir($val);
+ if (!$return) {
+ $error.= $err->errstr()."
";
} else {
- $error.=sprintf(_("The protected folder %s has been successfully unprotected"),$val)."
";
+ $error.= sprintf(_("The protected folder %s has been successfully unprotected"),$val)."
";
}
}
}
diff --git a/bureau/class/functions.php b/bureau/class/functions.php
index c099c315..892061b2 100644
--- a/bureau/class/functions.php
+++ b/bureau/class/functions.php
@@ -44,7 +44,7 @@ function fl($str) { return str_replace("<","<",str_replace("\"",""",$str
* @param struing $type
* @return mixed
*/
-function variable_get($name, $default = null, $createit_comment = null, $type=null) {
+function variable_get($name, $default = null, $createit_comment = null, $type = null) {
global $variables;
return $variables->variable_get($name, $default, $createit_comment, $type);
}
@@ -66,16 +66,16 @@ function variable_get($name, $default = null, $createit_comment = null, $type=nu
*/
function checkhostallow($domain,$dns) {
global $L_NS1,$L_NS2,$db,$dom;
- $sizefound=0;
- $found="";
+ $sizefound = 0;
+ $found = "";
$db->query("SELECT tld,mode FROM tld;");
while ($db->next_record()) {
- list($key,$val)=$db->Record;
+ list($key,$val) = $db->Record;
if (substr($domain,-1-strlen($key))==".".$key) {
if ($sizefound2) // OK, in the case 3 4 5
return $found;
- $n1=false; $n2=false;
- for ($i=0;$iquery("SELECT tld,mode FROM tld;");
while ($db->next_record()) {
- list($key,$val)=$db->Record;
+ list($key,$val) = $db->Record;
if (substr($domain,-1-strlen($key))==".".$key) {
if ($sizefound255)
return 1;
- $members=explode(".", $fqdn);
- if (count($members)>1) $ret=0; else $ret=4;
+ $members = explode(".", $fqdn);
+ if (count($members)>1) $ret = 0; else $ret = 4;
reset($members);
while (list ($key, $val) = each ($members)) {
if (strlen($val)>63)
@@ -262,10 +262,10 @@ function checkfqdn($fqdn) {
*/
function checkuserpath($path) {
global $mem;
- $user=$mem->user["login"];
- $usar=substr($user,0,1);
+ $user = $mem->user["login"];
+ $usar = substr($user,0,1);
if (substr($path,0,1)!="/")
- $path="/".$path;
+ $path = "/".$path;
$rpath = realpath(ALTERNC_HTML."/$usar/$user$path");
if (!$rpath) { // if file or directory does not exist
@@ -310,7 +310,7 @@ function cbox($test, $echo = TRUE) {
if ($test) {
$return = " checked=\"checked\"";
} else {
- $return='';
+ $return = '';
}
if( $echo ){
echo $return;
@@ -331,7 +331,7 @@ function selected($bool, $echo = TRUE) {
if ($bool) {
$return = " selected=\"selected\"";
} else {
- $return='';
+ $return = '';
}
if( $echo ){
echo $return;
@@ -347,7 +347,7 @@ function selected($bool, $echo = TRUE) {
* @param integer $affiche
* @return string
*/
-function ecif($test,$tr,$fa="",$affiche=1) {
+function ecif($test,$tr,$fa = "",$affiche = 1) {
if ($test){
$retour = $tr;
}
@@ -375,7 +375,7 @@ function __($str) {
* @param string $fa
* @return string
*/
-function ife($test,$tr,$fa="") {
+function ife($test,$tr,$fa = "") {
if ($test){
return $tr;
}
@@ -388,33 +388,33 @@ function ife($test,$tr,$fa="") {
* @param integer $html
* @return string
*/
-function format_size($size,$html=0) {
+function format_size($size,$html = 0) {
// Retourne une taille formatt�e en Octets, Kilo-octets, M�ga-octets ou Giga-Octets, avec 2 d�cimales.
if ("-" == $size) {
return $size;
}
- $size=(float)$size;
+ $size = (float)$size;
if ($size<1024) {
- $r=$size;
+ $r = $size;
if ($size!=1) {
$r.=" "._("Bytes");
} else {
$r.=" "._("Byte");
}
} else {
- $size=$size/1024;
+ $size = $size/1024;
if ($size<1024) {
- $r=round($size,2)." "._("Kb");
+ $r = round($size,2)." "._("Kb");
} else {
- $size=$size/1024;
+ $size = $size/1024;
if ($size<1024) {
- $r=round($size,2)." "._("Mb");
+ $r = round($size,2)." "._("Mb");
} else {
- $size=$size/1024;
+ $size = $size/1024;
if ($size<1024) {
- $r=round($size,2)." "._("Gb");
+ $r = round($size,2)." "._("Gb");
} else {
- $r=round($size/1024,2)." "._("Tb");
+ $r = round($size/1024,2)." "._("Tb");
}
}
}
@@ -448,17 +448,17 @@ function linkhelp($hid) {
* @return string
*/
function format_date($format,$date) {
- $d=substr($date,8,2);
- $m=substr($date,5,2);
- $y=substr($date,0,4);
- $h=substr($date,11,2);
- $i=substr($date,14,2);
+ $d = substr($date,8,2);
+ $m = substr($date,5,2);
+ $y = substr($date,0,4);
+ $h = substr($date,11,2);
+ $i = substr($date,14,2);
if ($h>12) {
- $hh=$h-12;
- $am="pm";
+ $hh = $h-12;
+ $am = "pm";
} else {
- $hh=$h;
- $am="am";
+ $hh = $h;
+ $am = "am";
}
return sprintf($format,$d,$m,$y,$h,$i,$hh,$am);
}
@@ -482,13 +482,13 @@ function ssla($str) {
* @return string Retourne le mot de passe crypt�
* @access private
*/
- function _md5cr($pass,$salt="") {
+ function _md5cr($pass,$salt = "") {
if (!$salt) {
- $chars="./0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
- for ($i=0;$i<12;$i++) {
+ $chars = "./0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
+ for ($i = 0;$i<12;$i++) {
$salt.=substr($chars,(mt_rand(0,strlen($chars))),1);
}
- $salt="$1$".$salt;
+ $salt = "$1$".$salt;
}
return crypt($pass,$salt);
}
@@ -536,7 +536,7 @@ function pretty_months($months) {
* @return string Code html pour le drop-down
* @access private
*/
-function duration_list($name, $selected=0) {
+function duration_list($name, $selected = 0) {
$res = "