[geeklog-cvs] Geeklog-1.x/public_html/admin/install index.php, 1.51, 1.52
Dirk Haun
dhaun at qs1489.pair.com
Wed Aug 13 03:39:58 EDT 2008
Update of /cvsroot/geeklog/Geeklog-1.x/public_html/admin/install
In directory qs1489.pair.com:/tmp/cvs-serv50665/public_html/admin/install
Modified Files:
index.php
Log Message:
Re-introduced function get_SP_Ver in the install script, which is still needed when upgrading from old Geeklog releases (reported by libexec)
Index: index.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/admin/install/index.php,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -d -r1.51 -r1.52
*** index.php 12 Aug 2008 06:31:49 -0000 1.51
--- index.php 13 Aug 2008 07:39:47 -0000 1.52
***************
*** 108,111 ****
--- 108,148 ----
+ /*
+ * 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)
+ *
+ * Note: Needed for upgrades from old versions - don't remove.
+ *
+ */
+ function get_SP_Ver()
+ {
+ global $_TABLES;
+
+ $retval = 0;
+
+ if (DB_count ($_TABLES['plugins'], 'pi_name', 'staticpages') > 0) {
+ $result = DB_query ("DESCRIBE {$_TABLES['staticpage']}");
+ $numrows = DB_numRows ($result);
+
+ $retval = 1; // assume v1.1 for now ...
+
+ for ($i = 0; $i < $numrows; $i++) {
+ $A = DB_fetchArray ($result, true);
+ 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;
+ }
+ }
+ }
+
+ return $retval;
+ }
+
+
/**
* Check if we can skip upgrade steps (post-1.5.0)
More information about the geeklog-cvs
mailing list