I knew I had the answer to this in my notes, but while looking for it, I found notes regarding another common bug you likely haven't noticed yet. The default country which is set in Configuration, is not selected when adding new site.
To fix that ... Edit include/add_site.php
Locate and removed this line ...
| Code: |
if(!isset($Country)){ $Country = $default_country;}
|
Locate
| Code: |
echo getFlagList("../images/flags", $Country);
|
and replace with this
| Code: |
echo getFlagList("../images/flags", $spec['DefaultCountry']);
|
With that fixed... getting the countries alphabetized ...
Locate and replace the entire getFlagList function in /include/functions.php
roughly lines # 76 to 102 ...
| Code: |
function getFlagList($dirName, $Country){
$d = dir($dirName);
while($entry = $d->read()){
... ... .. ...
$d->close();
return $html;
}
|
Replace with this ...
| Code: |
function getFlagList($dirName, $Country){
$d = dir($dirName);
while($entry = $d->read()){
if($entry != "." && $entry != ".." && $entry != "CVS"){
$short_entry = eregi_replace(".gif", "", $entry);
$short_entry = eregi_replace("_", " ", $short_entry);
$arrCountry[$short_entry] = $entry;
}
}
asort($arrCountry);
foreach ($arrCountry As $short_entry => $entry)
{
$html .= "<option value=\"" . $entry . "\"";
if($Country == $entry){
$html .= " selected=\"selected\"";
}
$html .= ">" . $short_entry . "</option>\n";
}
$d->close();
return $html;
}
}
|
And that should both issues