Coding style

This commit is contained in:
Alan Garcia 2014-03-26 11:01:02 +00:00
parent eb45d87d75
commit 0349fef05a
7 changed files with 13 additions and 9 deletions

View File

@ -46,6 +46,7 @@ $dom->unlock();
</tr>
<?php
$first_advanced=true;
$lst_advanced=array();
foreach($dom->domains_type_lst() as $dt) {
// If this type is disabled AND it's not the type in use here, continue
if ( $dt['enable'] == 'NONE' && strtoupper($type)!=strtoupper($dt['name'])) continue ;

View File

@ -37,6 +37,7 @@ class system_bind {
sd.type=dt.name
and sd.enable in ('ENABLE', 'ENABLED')
order by entry ;");
$t=array();
while ($db->next_record()) {
$t[$db->f('domaine')][] = $db->f('entry');
}

View File

@ -475,6 +475,7 @@ class DB_Sql {
function table_names() {
$this->query("SHOW TABLES");
$i=0;
$return=array();
while ($info=mysql_fetch_row($this->Query_ID))
{
$return[$i]["table_name"]= $info[0];

View File

@ -347,6 +347,7 @@ class m_admin {
$db->query($request);
if ($db->num_rows()) {
$c=array();
while ($db->next_record()) {
$c[$db->f("uid")]=$this->get($db->f("uid"));
}
@ -764,7 +765,7 @@ EOF;
# New way of deleting or backup delted user html folders using action class
$path=getuserpath($tt['login']);
$action->archive($path);
$action->archive($path);
$hooks->invoke("alternc_del_member");
$hooks->invoke("hook_admin_del_member");
@ -946,6 +947,7 @@ EOF;
function listtld() {
global $db;
$db->query("SELECT tld,mode FROM tld ORDER BY tld;");
$c=array();
while ($db->next_record()) {
$c[]=$db->Record;
}
@ -974,6 +976,7 @@ EOF;
}
}
$db->query("SELECT m.uid,m.login,d.domaine,d.gesdns,d.gesmx,d.noerase FROM domaines d LEFT JOIN membres m ON m.uid=d.compte ORDER BY domaine;");
$c=array();
while ($db->next_record()) {
$tmp=$db->Record;
if ($alsocheck) {

View File

@ -186,6 +186,7 @@ class m_bro {
$err->raise('bro',_("This directory do not exist"));
return false;
}
$c=array();
if ($dir = @opendir($absolute)) {
while (($file = readdir($dir)) !== false) {
if ($file!="." && $file!="..") {
@ -194,12 +195,8 @@ class m_bro {
}
closedir($dir);
}
if (isset ($c) && is_array($c)) {
usort ($c, array("m_bro","_sort_filelist_name"));
return $c;
} else {
return array();
}
usort ($c, array("m_bro","_sort_filelist_name"));
return $c;
}

View File

@ -127,7 +127,9 @@ class m_hta {
return false;
}
$pattern="/^".preg_quote(ALTERNC_HTML,"/")."\/.\/[^\/]*\/(.*)\/\.htpasswd/";
for($i=0;$i<count($sortie);$i++){
$r=array();
for($i=0;$i<count($sortie);$i++){
preg_match($pattern,$sortie[$i],$matches);
$tmpm=isset($matches[1])?'/'.$matches[1]:'';
$r[$i]=$tmpm."/";

View File

@ -306,7 +306,6 @@ class m_piwik {
if ($db->f('cnt') == 1) {
$api_data = $this->call_privileged_page('API', 'SitesManager.deleteSite', array('idSite' => $site_id));
if ($api_data->result == 'success') {
return $db->query("DELETE FROM piwik_sites where uid='$cuid' AND piwik_id='$site_id' LIMIT 1");
} else {