Commit 5885ecd6 authored by Freddy's avatar Freddy

make CSESC always alphabetically

parent c3ed0128
......@@ -29,7 +29,7 @@ class CSESC extends Core {
$data = $this->getData($catscanlink);
$artdata = $data['*'][0]['a']['*'];
$string = $this->makeString($artdata);
echo $string;
echo $string;
$this->updatePage($string, $page);
echo "\nDone!";
}
......@@ -37,8 +37,13 @@ class CSESC extends Core {
private function makeString($data) {
$string = "[{{fullurl:toollabs:catscan2/catscan2.php|project=wikipedia&language=de&categories=Eurovision%20Song%20Contest&depth=10&only_new=1&max_age=720&interface_language=de&doit=1#results}} 30-Tage-Catscan]\n\n";
$string .= "Es wurden " . count($data) . " Artikel in den letzten 30 Tagen neu angelegt.\n\n";
$datasort = array();
for($i = 0; count($data) > $i; $i++) {
$string .= "[[" . str_replace("_", " ", $data[$i]['title']) . "]]" . " • ";
$datasort[] = $data[$i]['title'];
}
sort($datasort);
for($i = 0; count($data) > $i; $i++) {
$string .= "[[" . str_replace("_", " ", $datasort[$i]) . "]]" . " • ";
}
$string = substr($string, 0, -4);
return $string;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment