]> git.openstreetmap.org Git - nominatim.git/blob - website/status.php
validate postgresql module / functions
[nominatim.git] / website / status.php
1 <?php
2         @define('CONST_ConnectionBucket_PageType', 'Status');
3
4         require_once(dirname(dirname(__FILE__)).'/lib/init-website.php');
5
6         $oDB =& getDB();
7         if (!$oDB || PEAR::isError($oDB))
8         {
9                 echo "ERROR: No database";
10                 exit;
11         }
12
13         $sStandardWord = $oDB->getOne("select make_standard_name('a')");
14         if (PEAR::isError($sStandardWord))
15         {
16                 echo "ERROR: Module failed";
17                 exit;
18         }
19         if ($sStandardWord != 'a')
20         {
21                 echo "ERROR: Transliteration failed";
22                 exit;
23         }
24
25         $iWordID = $oDB->getOne("select word_id,word_token, word, class, type, country_code, operator, search_name_count from word where word_token in (' a')");
26         if (PEAR::isError($iWordID))
27         {
28                 echo "ERROR: Query failed";
29                 exit;
30         }
31         if (!$iWordID)
32         {
33                 echo "ERROR: No value";
34                 exit;
35         }
36         echo "OK";
37         exit;
38