[geeklog-cvs] geeklog-1.3/public_html/admin/install install.php,1.58,1.59

dhaun at geeklog.net dhaun at geeklog.net
Sun Dec 28 13:54:02 EST 2003


Update of /usr/cvs/geeklog/geeklog-1.3/public_html/admin/install
In directory geeklog_prod:/tmp/cvs-serv1354/public_html/admin/install

Modified Files:
	install.php 
Log Message:
Static Pages 1.4: "wrap in block" option for each page and some fixes.


Index: install.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/admin/install/install.php,v
retrieving revision 1.58
retrieving revision 1.59
diff -C2 -d -r1.58 -r1.59
*** install.php	11 Dec 2003 20:49:32 -0000	1.58
--- install.php	28 Dec 2003 18:54:00 -0000	1.59
***************
*** 32,36 ****
  // |                                                                           |
  // +---------------------------------------------------------------------------+
! // | You don't need to change anything in this file.
  // | Please read docs/install.html which describes how to install Geeklog.     |
  // +---------------------------------------------------------------------------+
--- 32,36 ----
  // |                                                                           |
  // +---------------------------------------------------------------------------+
! // | You don't need to change anything in this file.                           |
  // | Please read docs/install.html which describes how to install Geeklog.     |
  // +---------------------------------------------------------------------------+
***************
*** 232,236 ****
  * Checks for Static Pages Version
  *
! * @return   0 = not installed, 1 = original plugin, 2 = plugin by Phill or Tom, 3 = v1.3
  *
  */
--- 232,236 ----
  * Checks for Static Pages Version
  *
! * @return   0 = not installed, 1 = original plugin, 2 = plugin by Phill or Tom, 3 = v1.3 (center block, etc.), 4 = 1.4 ('in block' flag)
  *
  */
***************
*** 251,257 ****
              if ($A[0] == 'sp_nf') {
                  $retval = 3; // v1.3
-                 break;
              } elseif ($A[0] == 'sp_pos') {
                  $retval = 2; // v1.2
              }
          }
--- 251,259 ----
              if ($A[0] == 'sp_nf') {
                  $retval = 3; // v1.3
              } elseif ($A[0] == 'sp_pos') {
                  $retval = 2; // v1.2
+             } elseif ($A[0] == 'sp_inblock') {
+                 $retval = 4; // v1.4
+                 break;
              }
          }
***************
*** 263,267 ****
  function INST_doDatabaseUpgrades($current_gl_version, $table_prefix)
  {
!     global $_TABLES, $_CONF, $_DB, $_DB_dbms, $_DB_table_prefix;
  
      $_DB->setDisplayError (true);
--- 265,269 ----
  function INST_doDatabaseUpgrades($current_gl_version, $table_prefix)
  {
!     global $_TABLES, $_CONF, $_SP_CONF, $_DB, $_DB_dbms, $_DB_table_prefix;
  
      $_DB->setDisplayError (true);
***************
*** 497,500 ****
--- 499,516 ----
              $filename = substr ($_CONF['rdf_file'], $pos + 1);
              DB_query ("INSERT INTO {$_TABLES['syndication']} (title, description, limits, content_length, filename, charset, language, is_enabled, updated, update_info) VALUES ('{$_CONF['site_name']}', '{$_CONF['site_slogan']}', '{$_CONF['rdf_limit']}', {$_CONF['rdf_storytext']}, '{$filename}', '{$_CONF['default_charset']}', '{$_CONF['rdf_language']}', {$_CONF['backend']}, '0000-00-00 00:00:00', NULL)");
+ 
+             // upgrade static pages plugin
+             $spversion = get_SP_ver ();
+             if ($spversion < 4) {
+                 if (!isset ($_SP_CONF['in_block'])) {
+                     $_SP_CONF['in_block'] = 1;
+                 } else if ($_SP_CONF['in_block'] > 1) {
+                     $_SP_CONF['in_block'] = 1;
+                 } else if ($_SP_CONF['in_block'] < 0) {
+                     $_SP_CONF['in_block'] = 0;
+                 }
+                 DB_query ("ALTER TABLE {$_TABLES['staticpage']} ADD COLUMN sp_inblock tinyint(1) unsigned DEFAULT '{$_SP_CONF['in_block']}'");
+             }
+             DB_query ("UPDATE {$_TABLES['plugins']} SET pi_version = '1.4', pi_gl_version = '1.3.9' WHERE pi_name = 'staticpages'");
  
              // recreate 'date' field for old links





More information about the geeklog-cvs mailing list