]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - install.php
Merge commit 'origin/master' into testing
[quix0rs-gnu-social.git] / install.php
index 32b0447c889db146fa2f31205de250aaf4572f69..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');
 
@@ -664,7 +677,7 @@ STR;
 
     updateStatus("StatusNet has been installed at $link");
     updateStatus(
-        "You can visit your <a href='$link'>new StatusNet site</a> (login as '$adminNick')."
+        "<strong>DONE!</strong> You can visit your <a href='$link'>new StatusNet site</a> (login as '$adminNick'). If this is your first StatusNet install, you may want to poke around our <a href='http://status.net/wiki/Getting_started'>Getting Started guide</a>."
     );
 }
 
@@ -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;
 }