]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/installer.php
Merge branch '1.0.x' into testing
[quix0rs-gnu-social.git] / lib / installer.php
index 441f7266063e932ef83f84369be20ebcebf5d506..1add65ba815a654ffaeab6ba39adaea6f988d26a 100644 (file)
@@ -236,7 +236,7 @@ abstract class Installer
         }
         // @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);
@@ -341,6 +341,7 @@ abstract class Installer
             }
             $schema->ensureTable($name, $def);
         }
+        return true;
     }
 
     /**
@@ -441,11 +442,12 @@ abstract class Installer
             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;
@@ -458,9 +460,6 @@ abstract class Installer
      */
     function registerInitialUser()
     {
-        define('STATUSNET', true);
-        define('LACONICA', true); // compatibility
-
         require_once INSTALLDIR . '/lib/common.php';
 
         $data = array('nickname' => $this->adminNick,