]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - install.php
Command input processing now has centralized places for looking up notice, user/profi...
[quix0rs-gnu-social.git] / install.php
index bb53e2b55b4b5a3f08c07951a7f1de14cc8da808..929277e5e857422a199233bb78141bd49387d59e 100644 (file)
@@ -301,6 +301,19 @@ function checkPrereqs()
         $pass = false;
     }
 
+    // Look for known library bugs
+    $str = "abcdefghijklmnopqrstuvwxyz";
+    $replaced = preg_replace('/[\p{Cc}\p{Cs}]/u', '*', $str);
+    if ($str != $replaced) {
+        printf('<p class="error">PHP is linked to a version of the PCRE library ' .
+               'that does not support Unicode properties. ' .
+               'If you are running Red Hat Enterprise Linux / ' .
+               'CentOS 5.4 or earlier, see <a href="' .
+               'http://status.net/wiki/Red_Hat_Enterprise_Linux#PCRE_library' .
+               '">our documentation page</a> on fixing this.</p>');
+        $pass = false;
+    }
+
     $reqs = array('gd', 'curl',
                   'xmlwriter', 'mbstring', 'xml', 'dom', 'simplexml');
 
@@ -865,6 +878,19 @@ function registerInitialUser($nickname, $password, $email)
     $user->grantRole('owner');
     $user->grantRole('moderator');
     $user->grantRole('administrator');
+    
+    // Attempt to do a remote subscribe to update@status.net
+    // Will fail if instance is on a private network.
+
+    if (class_exists('Ostatus_profile')) {
+        try {
+            $oprofile = Ostatus_profile::ensureProfile('http://update.status.net/');
+            Subscription::start($user->getProfile(), $oprofile->localProfile());
+            updateStatus("Set up subscription to <a href='http://update.status.net/'>update@status.net</a>.");
+        } catch (Exception $e) {
+            updateStatus("Could not set up subscription to <a href='http://update.status.net/'>update@status.net</a>.");
+        }
+    }
 
     return true;
 }