Coding style
This commit is contained in:
parent
eb45d87d75
commit
0349fef05a
|
@ -46,6 +46,7 @@ $dom->unlock();
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$first_advanced=true;
|
$first_advanced=true;
|
||||||
|
$lst_advanced=array();
|
||||||
foreach($dom->domains_type_lst() as $dt) {
|
foreach($dom->domains_type_lst() as $dt) {
|
||||||
// If this type is disabled AND it's not the type in use here, continue
|
// 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 ;
|
if ( $dt['enable'] == 'NONE' && strtoupper($type)!=strtoupper($dt['name'])) continue ;
|
||||||
|
|
|
@ -37,6 +37,7 @@ class system_bind {
|
||||||
sd.type=dt.name
|
sd.type=dt.name
|
||||||
and sd.enable in ('ENABLE', 'ENABLED')
|
and sd.enable in ('ENABLE', 'ENABLED')
|
||||||
order by entry ;");
|
order by entry ;");
|
||||||
|
$t=array();
|
||||||
while ($db->next_record()) {
|
while ($db->next_record()) {
|
||||||
$t[$db->f('domaine')][] = $db->f('entry');
|
$t[$db->f('domaine')][] = $db->f('entry');
|
||||||
}
|
}
|
||||||
|
|
|
@ -475,6 +475,7 @@ class DB_Sql {
|
||||||
function table_names() {
|
function table_names() {
|
||||||
$this->query("SHOW TABLES");
|
$this->query("SHOW TABLES");
|
||||||
$i=0;
|
$i=0;
|
||||||
|
$return=array();
|
||||||
while ($info=mysql_fetch_row($this->Query_ID))
|
while ($info=mysql_fetch_row($this->Query_ID))
|
||||||
{
|
{
|
||||||
$return[$i]["table_name"]= $info[0];
|
$return[$i]["table_name"]= $info[0];
|
||||||
|
|
|
@ -347,6 +347,7 @@ class m_admin {
|
||||||
$db->query($request);
|
$db->query($request);
|
||||||
|
|
||||||
if ($db->num_rows()) {
|
if ($db->num_rows()) {
|
||||||
|
$c=array();
|
||||||
while ($db->next_record()) {
|
while ($db->next_record()) {
|
||||||
$c[$db->f("uid")]=$this->get($db->f("uid"));
|
$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
|
# New way of deleting or backup delted user html folders using action class
|
||||||
$path=getuserpath($tt['login']);
|
$path=getuserpath($tt['login']);
|
||||||
$action->archive($path);
|
$action->archive($path);
|
||||||
|
|
||||||
$hooks->invoke("alternc_del_member");
|
$hooks->invoke("alternc_del_member");
|
||||||
$hooks->invoke("hook_admin_del_member");
|
$hooks->invoke("hook_admin_del_member");
|
||||||
|
@ -946,6 +947,7 @@ EOF;
|
||||||
function listtld() {
|
function listtld() {
|
||||||
global $db;
|
global $db;
|
||||||
$db->query("SELECT tld,mode FROM tld ORDER BY tld;");
|
$db->query("SELECT tld,mode FROM tld ORDER BY tld;");
|
||||||
|
$c=array();
|
||||||
while ($db->next_record()) {
|
while ($db->next_record()) {
|
||||||
$c[]=$db->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;");
|
$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()) {
|
while ($db->next_record()) {
|
||||||
$tmp=$db->Record;
|
$tmp=$db->Record;
|
||||||
if ($alsocheck) {
|
if ($alsocheck) {
|
||||||
|
|
|
@ -186,6 +186,7 @@ class m_bro {
|
||||||
$err->raise('bro',_("This directory do not exist"));
|
$err->raise('bro',_("This directory do not exist"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
$c=array();
|
||||||
if ($dir = @opendir($absolute)) {
|
if ($dir = @opendir($absolute)) {
|
||||||
while (($file = readdir($dir)) !== false) {
|
while (($file = readdir($dir)) !== false) {
|
||||||
if ($file!="." && $file!="..") {
|
if ($file!="." && $file!="..") {
|
||||||
|
@ -194,12 +195,8 @@ class m_bro {
|
||||||
}
|
}
|
||||||
closedir($dir);
|
closedir($dir);
|
||||||
}
|
}
|
||||||
if (isset ($c) && is_array($c)) {
|
usort ($c, array("m_bro","_sort_filelist_name"));
|
||||||
usort ($c, array("m_bro","_sort_filelist_name"));
|
return $c;
|
||||||
return $c;
|
|
||||||
} else {
|
|
||||||
return array();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,9 @@ class m_hta {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$pattern="/^".preg_quote(ALTERNC_HTML,"/")."\/.\/[^\/]*\/(.*)\/\.htpasswd/";
|
$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);
|
preg_match($pattern,$sortie[$i],$matches);
|
||||||
$tmpm=isset($matches[1])?'/'.$matches[1]:'';
|
$tmpm=isset($matches[1])?'/'.$matches[1]:'';
|
||||||
$r[$i]=$tmpm."/";
|
$r[$i]=$tmpm."/";
|
||||||
|
|
|
@ -306,7 +306,6 @@ class m_piwik {
|
||||||
|
|
||||||
if ($db->f('cnt') == 1) {
|
if ($db->f('cnt') == 1) {
|
||||||
$api_data = $this->call_privileged_page('API', 'SitesManager.deleteSite', array('idSite' => $site_id));
|
$api_data = $this->call_privileged_page('API', 'SitesManager.deleteSite', array('idSite' => $site_id));
|
||||||
|
|
||||||
if ($api_data->result == 'success') {
|
if ($api_data->result == 'success') {
|
||||||
return $db->query("DELETE FROM piwik_sites where uid='$cuid' AND piwik_id='$site_id' LIMIT 1");
|
return $db->query("DELETE FROM piwik_sites where uid='$cuid' AND piwik_id='$site_id' LIMIT 1");
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue