<?php //Requires require_once '/data/project/xtools/public_html/WebTool.php'; //Load WebTool class $wt = new WebTool('Translator', 'translate', array('database', 'showonlyerrors', 'peachy')); WebTool::setMemLimit(); WebTool::setDBVars(); /*UPDATE ME*/ $wtSource = "//code.google.com/p/soxred93tools/source/browse/trunk/web/translate"; $wtTranslate = true; //Get list of languages #FIXME: There is no workaround for this at the moment until labs has the bd directory setup $dbr = new Database('sql-toolserver', $toolserver_username, $toolserver_password, 'toolserver'); $res = $dbr->select('wiki', 'DISTINCT lang', array('is_meta != 1', 'is_multilang != 1', 'is_closed != 1'), array('ORDER BY' => 'lang ASC')); $langs = array(); foreach ($res as $r) { $langs[] = $r['lang']; } $s = array_search('en-simple', $langs); unset($langs[$s]); $langs[] = 'simple'; sort($langs); $langs[] = 'qqq'; $tools = array('Global' => array('uri' => '/data/project/xtools/public_html/configs/', 'name' => 'main'), 'Articleinfo' => array('uri' => '/data/project/xtools/public_html/articleinfo/configs/', 'name' => 'articleinfo'), 'Bash' => array('uri' => '/data/project/xtools/public_html/bash/configs/', 'name' => 'bash'), 'Autoedits' => array('uri' => '/data/project/xtools/public_html/autoedits/configs/', 'name' => 'autoedits'), 'Editcounter' => array('uri' => '/data/project/xtools/public_html/pcount/configs/', 'name' => 'pcount'), 'Replag' => array('uri' => '/data/project/xtools/public_html/replag/configs/', 'name' => 'replag'), 'Translator' => array('uri' => '/data/project/xtools/public_html/translate/configs/', 'name' => 'translate')); //Show form if &action parameter is not set (or empty) if (!$wgRequest->getSafeVal('getBool', 'action')) { $content->assign('form', true); $content->assign('tools', $tools); $content->assign('langs', $langs); if ($wgRequest->getBool('usetool')) {