Skip to content

Commit

Permalink
take en.wp as default home wiki
Browse files Browse the repository at this point in the history
  • Loading branch information
FlominatorTM committed Jun 14, 2015
1 parent 8095441 commit 93a2d05
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions next_inc/OfferPages.php
Expand Up @@ -14,6 +14,7 @@ public function __construct($homeServer)
//$allServers = array("fr.wikipedia.org");

$indexOfMyServer = -1;
$indexOfEnWp = -1;
$i=0;
foreach($allServers as $oneServer)
{
Expand All @@ -32,14 +33,23 @@ public function __construct($homeServer)
{
$indexOfMyServer = $i;
}

if($oneServer == "en.wikipedia.org")
{
$indexOfEnWp = $i;
}
$i++;
}

$this->PutHomeServerFirst($indexOfMyServer);
$this->PutHomeServerFirst($indexOfMyServer, $indexOfEnWp);
}

function PutHomeServerFirst ($indexOfMyServer)
{ if($indexOfMyServer!=-1)
function PutHomeServerFirst ($indexOfMyServer, $indexOfEnWp)
{ if($indexOfMyServer==-1)
{
$indexOfMyServer = $indexOfEnWp;
}

if($indexOfMyServer!=-1)
{
$firstServer = $this->Items[0];
$this->Items[0] = $this->Items[$indexOfMyServer];
Expand Down

0 comments on commit 93a2d05

Please sign in to comment.