/
foto_check.php
78 lines (69 loc) · 2.04 KB
/
foto_check.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?php
//finds users whose coordinate articles are problematic
//underscore stuff is legacy, camel-cased is php 5
require_once("setup.php");
if(isset($_REQUEST['purge']))
{
$whatToPurge = trim($_REQUEST['purge']);
if($whatToPurge[0]!='.')
{
$cacheFile = './cached/' . $whatToPurge . '.rev';
if(file_exists($cacheFile))
{
unlink($cacheFile);
}
}
}
$allOfferPages = new OfferPages($server);
echo '<h1>'. $I18N->msg( 'foto_check').'</h1>';
echo '<a href="foto_range.php">'. $I18N->msg( 'back_to_range') .'</a>';
foreach($allOfferPages->Items as $oneOfferPage)
{
echo "<h2> $oneOfferPage->Link </h2>";
echo '<table border="1">';
echo ' <colgroup>';
echo '<col width="100">';
echo '<col width="100">';
echo '<col width="100">';
echo '</colgroup>';
echo '<tr>';
echo '<th>' .$I18N->msg( 'column_user').'</th>';
echo '<th>' .$I18N->msg( 'column_location').'</th>';
echo '<th>' .$I18N->msg( 'column_problem').'</th>';
echo '</tr>';
$count= 0;
for($i=0;$i<$oneOfferPage->GetNumberOfUsers();$i++)
{
$usr = $oneOfferPage->GetUserAt($i);
if(!$usr->IsValid() || $usr->location->onlyFallback)
{
$count++;
echo '<tr>';
echo '<td>'. $usr->Link . '</td>';
echo '<td>'. '<a href="https://' . $oneOfferPage->server . '/wiki/' . $usr->location->name . '">' . $usr->location->name . '</a>' . '</td>';
echo '<td>';
if(!$usr->location->exists)
{
echo $I18N->msg( 'problem_no_article');
}
else
{
if(!$usr->location->hasCoordinates)
{
echo $I18N->msg( 'problem_no_coordinates');
}
else if($usr->location->onlyFallback)
{
echo $I18N->msg( 'problem_no_coordinates').'<br>';
echo '<i>'.$I18N->msg( 'problem_fallback').'</i>';
}
}
echo '</td>';
echo '</tr>';
}
}
echo '</table>';
echo $I18N->msg( 'items_found', array('variables'=> array( $count) , 'parsemag' => true ));
echo ' - <a href="?purge=' . $oneOfferPage->server . '">' .$I18N->msg( 'purge_cache') . '</a>';
}
?>