}
// @fixme hardcoded list; should use User::allowed_nickname()
// if/when it's safe to have loaded the infrastructure here
- $blacklist = array('main', 'admin', 'twitter', 'settings', 'rsd.xml', 'favorited', 'featured', 'favoritedrss', 'featuredrss', 'rss', 'getfile', 'api', 'groups', 'group', 'peopletag', 'tag', 'user', 'message', 'conversation', 'bookmarklet', 'notice', 'attachment', 'search', 'index.php', 'doc', 'opensearch', 'robots.txt', 'xd_receiver.html', 'facebook');
+ $blacklist = array('main', 'panel', 'twitter', 'settings', 'rsd.xml', 'favorited', 'featured', 'favoritedrss', 'featuredrss', 'rss', 'getfile', 'api', 'groups', 'group', 'peopletag', 'tag', 'user', 'message', 'conversation', 'bookmarklet', 'notice', 'attachment', 'search', 'index.php', 'doc', 'opensearch', 'robots.txt', 'xd_receiver.html', 'facebook');
if (in_array($this->adminNick, $blacklist)) {
$this->updateStatus('The user nickname "' . htmlspecialchars($this->adminNick) .
'" is reserved.', true);
}
$schema->ensureTable($name, $def);
}
+ return true;
}
/**
if (!mb_strlen($stmt)) {
continue;
}
- $res = $conn->execute($stmt);
- if (DB::isError($res)) {
- $error = $result->getMessage();
+ try {
+ $res = $conn->simpleQuery($stmt);
+ } catch (Exception $e) {
+ $error = $e->getMessage();
$this->updateStatus("ERROR ($error) for SQL '$stmt'");
- return $res;
+ return false;
}
}
return true;
*/
function registerInitialUser()
{
- define('STATUSNET', true);
- define('LACONICA', true); // compatibility
-
require_once INSTALLDIR . '/lib/common.php';
$data = array('nickname' => $this->adminNick,