Bugfix : quand on ajoute un domaine, la liste des redirection proposé
ne contenais *que* les domaines dont le DNS était géré en local.
This commit is contained in:
parent
ca6311c3d3
commit
f5d4dc84fd
|
@ -71,7 +71,7 @@ if ($q["u"]>0) {
|
||||||
<input type="radio" id="newisslave1" name="newisslave" value="1"<?php cbox($newisslave==1); ?>/><label for="newisslave1"><?php __("Yes, redirect this new domain to this one:"); ?> </label> <select name="slavedom" id="slavedom" class="inl">
|
<input type="radio" id="newisslave1" name="newisslave" value="1"<?php cbox($newisslave==1); ?>/><label for="newisslave1"><?php __("Yes, redirect this new domain to this one:"); ?> </label> <select name="slavedom" id="slavedom" class="inl">
|
||||||
<option value=""><?php __("-- Choose a domain --"); ?></option>
|
<option value=""><?php __("-- Choose a domain --"); ?></option>
|
||||||
<?php
|
<?php
|
||||||
$dl=$dom->get_domain_list($cuid);
|
$dl=$dom->get_domain_list($cuid, false);
|
||||||
$ddl=array();
|
$ddl=array();
|
||||||
foreach($dl as $d) {
|
foreach($dl as $d) {
|
||||||
$ddl[$d]=$d;
|
$ddl[$d]=$d;
|
||||||
|
|
|
@ -1132,14 +1132,20 @@ class m_dom {
|
||||||
/**
|
/**
|
||||||
* Returns the complete hosted domain list :
|
* Returns the complete hosted domain list :
|
||||||
*/
|
*/
|
||||||
function get_domain_list($uid=-1) {
|
function get_domain_list($uid=-1, $nodns=true) {
|
||||||
global $db,$err;
|
global $db,$err;
|
||||||
$uid=intval($uid);
|
$uid=intval($uid);
|
||||||
$res=array();
|
$res=array();
|
||||||
|
if ( $nodns ) {
|
||||||
|
$sql=" gesdns=0 ";
|
||||||
|
} else {
|
||||||
|
$sql=" gesdns=1 ";
|
||||||
|
}
|
||||||
|
|
||||||
if ($uid!=-1) {
|
if ($uid!=-1) {
|
||||||
$sql=" AND compte='$uid' ";
|
$sql.=" AND compte='$uid' ";
|
||||||
}
|
}
|
||||||
$db->query("SELECT domaine FROM domaines WHERE gesdns=1 $sql ORDER BY domaine");
|
$db->query("SELECT domaine FROM domaines WHERE $sql ORDER BY domaine");
|
||||||
while ($db->next_record()) {
|
while ($db->next_record()) {
|
||||||
$res[]=$db->f("domaine");
|
$res[]=$db->f("domaine");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue