function addApi(&$config) { $root = getNamespaces(); foreach ($root as $ns => $href) { $fns = getNamespaceFunctions($ns, $href); addNamespaceFunctionsToConfig($config, $ns, $fns); } }
<option value="14">Category</option> <option value="15">Category talk</option> <option value="100">Portal</option> <option value="101">Portal talk</option> </select><br /> <input type="submit" value="Submit" /> </form><br /><hr />'; toDie($msg); } $oldname = ucfirst(ltrim(rtrim(str_replace(array(''', '%20'), array('\'', ' '), $_GET['name'])))); $oldname = urldecode($oldname); $oldname = str_replace('_', ' ', $oldname); $oldname = str_replace('/', '', $oldname); $name = mysql_escape_string($oldname); $namespace = mysql_escape_string($_GET['namespace']); $nsnames = getNamespaces(); mysql_connect('enwiki.labsdb', $toolserver_username, $toolserver_password); @mysql_select_db('enwiki_p') or toDie("MySQL ERROR! " . mysql_error()); function getReplag() { $query = "SELECT UNIX_TIMESTAMP() - UNIX_TIMESTAMP(rc_timestamp) as replag FROM recentchanges_userindex ORDER BY rc_timestamp DESC LIMIT 1"; $result = mysql_query($query); if (!$result) { toDie("MySQL ERROR! " . mysql_error()); } $row = mysql_fetch_assoc($result); $replag = $row['replag']; $seconds = floor($replag); $text = formatReplag($seconds); return array($seconds, $text); }