Made UX for Windows patch more pleasant including external documentation. Breaking change to dynamic download script.
authorDan
Thu, 27 Nov 2008 10:21:58 -0500
changeset 310 78cb09a23e69
parent 309 cf26ccfd99d8
child 311 e1bd2e524072
Made UX for Windows patch more pleasant including external documentation. Breaking change to dynamic download script.
includes/constants.php
includes/paths.php
install.php
--- a/includes/constants.php	Tue Nov 25 22:08:00 2008 -0500
+++ b/includes/constants.php	Thu Nov 27 10:21:58 2008 -0500
@@ -70,6 +70,8 @@
 define('MAX_PMS_PER_BATCH', 7); // The maximum number of users that users can send PMs to in one go; restriction does not apply to users with mod_misc rights
 define('SEARCH_RESULTS_PER_PAGE', 10);
 define('MYSQL_MAX_PACKET_SIZE', 1048576); // 1MB; this is the default in MySQL 4.x I think
+// don't change this next line in upstream (it has to be auto-patched by the dynamic download script)
+// define('WINDOWS_MOD_REWRITE_WORKAROUNDS', '');
 
 // Sidebar
 
--- a/includes/paths.php	Tue Nov 25 22:08:00 2008 -0500
+++ b/includes/paths.php	Thu Nov 27 10:21:58 2008 -0500
@@ -28,18 +28,19 @@
     
     // DEFINE NAMESPACES HERE
     // The key names should NOT EVER be changed, or Enano will be very broken
+    $namespace_delimiter = ( defined('WINDOWS_MOD_REWRITE_WORKAROUNDS') ) ? '.' : ':';
     $this->nslist = Array(
-      'Article' =>'',
-      'User'    =>'User:',
-      'File'    =>'File:',
-      'Help'    =>'Help:',
-      'Admin'   =>'Admin:',
-      'Special' =>'Special:',
-      'System'  =>'Enano:',
-      'Template'=>'Template:',
-      'Category'=>'Category:',
-      'Anonymous'=>'PhysicalRedirect:',
-      'Project' =>sanitize_page_id(getConfig('site_name')).':',
+      'Article'  => '',
+      'User'     => 'User' . $namespace_delimiter,
+      'File'     => 'File' . $namespace_delimiter,
+      'Help'     => 'Help' . $namespace_delimiter,
+      'Admin'    => 'Admin' . $namespace_delimiter,
+      'Special'  => 'Special' . $namespace_delimiter,
+      'System'   => 'Enano' . $namespace_delimiter,
+      'Template' => 'Template' . $namespace_delimiter,
+      'Category' => 'Category' . $namespace_delimiter,
+      'Anonymous'=> 'PhysicalRedirect' . $namespace_delimiter,
+      'Project'  => sanitize_page_id(getConfig('site_name')) . $namespace_delimiter,
       );
     
     // ACL types
--- a/install.php	Tue Nov 25 22:08:00 2008 -0500
+++ b/install.php	Thu Nov 27 10:21:58 2008 -0500
@@ -31,6 +31,7 @@
 define('IN_ENANO_INSTALL', 'true');
 
 define('ENANO_VERSION', '1.0.5');
+define('ENANO_RELEASE_NAME', 'Ferrishyn');
 // In beta versions, define ENANO_BETA_VERSION here
 
 if(!defined('scriptPath')) {
@@ -1150,8 +1151,8 @@
     <div style="text-align: center; margin-top: 10px;">
       <img alt="[ Enano CMS Project logo ]" src="images/enano-artwork/installer-greeting-blue.png" style="display: block; margin: 0 auto; padding-left: 100px;" />
       <h2>Welcome to Enano</h2>
-      <h3>Version 1.0.4 &ndash; stable<br />
-      <span style="font-weight: normal;">also affectionately known as "ellyyllon" <tt>:)</tt></span></h3>
+      <h3>Version <?php echo ENANO_VERSION; ?> &ndash; stable<br />
+      <span style="font-weight: normal;">also affectionately known as "<?php echo ENANO_RELEASE_NAME; ?>" <tt>:)</tt></span></h3>
       <?php
       if ( file_exists('./_nightly.php') )
       {
@@ -1527,6 +1528,27 @@
         }
       ?>
       <p>The next step is to enter some information about your website. You can always change this information later, using the administration panel.</p>
+      <?php
+      if ( defined('WINDOWS_MOD_REWRITE_WORKAROUNDS') )
+      {
+        $patch_necessary = ( strtolower(PHP_OS) == 'win32' && substr(@$_SERVER['SERVER_SOFTWARE'], 'Apache/2.2') );
+        ?>
+          <div class="usermessage">
+            <b>Your copy of Enano has the Windows mod_rewrite workaround patch enabled.</b><br />
+            <?php if ( $patch_necessary ): ?>
+              If you don't plan to use the Tiny URLs option below, you should go back and re-download Enano without this workaround enabled.
+              The mod_rewrite issues Enano faces under Windows are caused by a security change in Apache 2.2 that is not present in Apache 2.0.
+              <a href="http://enanocms.org/windows-patch">Learn more</a>
+            <?php else: ?>
+              The Enano installer has detected that you're probably not running Apache 2.2 under Windows. You don't need this workaround
+              unless you're using this specific software stack. Unless you're sure that you are running Apache 2.2 under Windows on your server,
+              it is recommended that you disable the <tt>WINDOWS_MOD_REWRITE_WORKAROUNDS</tt> constant in includes/constants.php.
+              <a href="http://enanocms.org/windows-patch" onclick="window.open(this.href); return false;">Learn more</a>
+            <?php endif; ?>
+          </div>
+        <?php
+      }
+      ?>
       <table border="0">
         <tr><td><b>Website name</b><br />The display name of your website. Allowed characters are uppercase and lowercase letters, numerals, and spaces. This must not be blank or "Enano".</td><td><input onkeyup="verify();" name="sitename" type="text" size="30" /></td><td><img id="s_name" alt="Good/bad icon" src="images/bad.gif" /></td></tr>
         <tr><td><b>Website description</b><br />This text will be shown below the name of your website.</td><td><input onkeyup="verify();" name="sitedesc" type="text" size="30" /></td><td><img id="s_desc" alt="Good/bad icon" src="images/bad.gif" /></td></tr>