]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - install.php
Merge branch 'master' into testing
[quix0rs-gnu-social.git] / install.php
index 5cb46e27d2ae9234fa5d41afa2199d64ad037208..190941c5abf6b33f11baf7f9329a158bf56cd61b 100644 (file)
@@ -248,6 +248,21 @@ class WebInstaller extends Installer
                     </li>
                 </ul>
             </fieldset>
+            <fieldset id="settings_profile">
+                <legend>Site profile</legend>
+                <ul class="form_data">
+                    <li>
+                        <label for="site_profile">Type of site</label>
+                        <select id="site_profile" name="site_profile">
+                            <option value="private">Private</option>
+                            <option value="community">Community</option>
+                            <option value ="public">Public</option>
+                            <option value ="singleuser">Single User</option>
+                        </select>
+                        <p class="form_guide">Initial access settings for your site</p>
+                    </li>
+                </ul>
+            </fieldset>
             <input type="submit" name="submit" class="submit" value="Submit" />
         </fieldset>
     </form>
@@ -284,7 +299,7 @@ STR;
     /**
      * Read and validate input data.
      * May output side effects.
-     * 
+     *
      * @return boolean success
      */
     function prepare()
@@ -304,6 +319,8 @@ STR;
         $this->adminEmail   = $post->string('admin_email');
         $this->adminUpdates = $post->string('admin_updates');
 
+        $this->siteProfile = $post->string('site_profile');
+
         $this->server = $_SERVER['HTTP_HOST'];
         $this->path = substr(dirname($_SERVER['PHP_SELF']), 1);
 
@@ -315,12 +332,16 @@ STR;
         if (!$this->validateAdmin()) {
             $fail = true;
         }
-        
+
         if ($this->adminPass != $adminPass2) {
             $this->updateStatus("Administrator passwords do not match. Did you mistype?", true);
             $fail = true;
         }
-        
+
+        if (!$this->validateSiteProfile()) {
+            $fail = true;
+        }
+
         return !$fail;
     }
 
@@ -359,11 +380,11 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
               <div id="content_wrapper">
                <div id="site_nav_local_views_wrapper">
                 <div id="site_nav_local_views"></div>
-                
+
                 <div id="content">
                      <div id="content_inner">
                         <h1>Install StatusNet</h1>
-<?php 
+<?php
 $installer = new WebInstaller();
 $installer->main();
 ?>