[geeklog-cvs] Geeklog-1.x/plugins/polls/sql mssql_install.php, 1.3, 1.4 mysql_install.php, 1.9, 1.10

Dirk Haun dhaun at qs1489.pair.com
Fri May 2 08:08:09 EDT 2008


Update of /cvsroot/geeklog/Geeklog-1.x/plugins/polls/sql
In directory qs1489.pair.com:/tmp/cvs-serv42113/polls/sql

Modified Files:
	mssql_install.php mysql_install.php 
Log Message:
An attempt to update the MS SQL for the plugin installs (and no, I don't know what I'm doing ...)


Index: mssql_install.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/plugins/polls/sql/mssql_install.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** mssql_install.php	16 Jan 2007 04:01:07 -0000	1.3
--- mssql_install.php	2 May 2008 12:08:07 -0000	1.4
***************
*** 3,11 ****
  /* Reminder: always indent with 4 spaces (no tabs). */
  // +---------------------------------------------------------------------------+
! // | Polls Plugin 1.0                                                          |
  // +---------------------------------------------------------------------------+
  // | Installation SQL                                                          |
  // +---------------------------------------------------------------------------+
! // | Copyright (C) 2000-2006 by the following authors:                         |
  // |                                                                           |
  // | Authors: Tony Bibbs        - tony AT tonybibbs DOT com                    |
--- 3,11 ----
  /* Reminder: always indent with 4 spaces (no tabs). */
  // +---------------------------------------------------------------------------+
! // | Polls Plugin 2.0                                                          |
  // +---------------------------------------------------------------------------+
  // | Installation SQL                                                          |
  // +---------------------------------------------------------------------------+
! // | Copyright (C) 2000-2008 by the following authors:                         |
  // |                                                                           |
  // | Authors: Tony Bibbs        - tony AT tonybibbs DOT com                    |
***************
*** 13,17 ****
  // |          Jason Whittenburg - jwhitten AT securitygeeks DOT com            |
  // |          Dirk Haun         - dirk AT haun-online DOT de                   |
! // |          Trinity Bays      - trinity AT steubentech DOT com               |
  // |          Randy Kolenko     - randy AT nextide DOT ca                      |
  // +---------------------------------------------------------------------------+
--- 13,17 ----
  // |          Jason Whittenburg - jwhitten AT securitygeeks DOT com            |
  // |          Dirk Haun         - dirk AT haun-online DOT de                   |
! // |          Trinity Bays      - trinity93 AT gmail DOT com                   |
  // |          Randy Kolenko     - randy AT nextide DOT ca                      |
  // +---------------------------------------------------------------------------+
***************
*** 32,56 ****
  // +---------------------------------------------------------------------------+
  //
! 
! 
  
  $_SQL[] = "
  CREATE TABLE [dbo].[{$_TABLES['pollanswers']}] (
!     [qid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
      [aid] [tinyint] NOT NULL ,
      [answer] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
      [votes] [numeric](8, 0) NULL ,
!     [remark] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
  ) ON [PRIMARY]
  ";
  
  
  $_SQL[] = "
  CREATE TABLE [dbo].[{$_TABLES['polltopics']}] (
      [pid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
!     [question] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
      [voters] [numeric](8, 0) NULL ,
      [date] [datetime] NULL ,
!     [display] [smallint] NOT NULL ,
      [commentcode] [smallint] NOT NULL ,
      [statuscode] [smallint] NOT NULL ,
--- 32,66 ----
  // +---------------------------------------------------------------------------+
  //
! // $Id$
  
  $_SQL[] = "
  CREATE TABLE [dbo].[{$_TABLES['pollanswers']}] (
!     [pid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
!     [qid] [int] NOT NULL ,
      [aid] [tinyint] NOT NULL ,
      [answer] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
      [votes] [numeric](8, 0) NULL ,
!     [remark] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
  ) ON [PRIMARY]
  ";
  
+ $_SQL[] = "
+ CREATE TABLE [dbo].[{$_TABLES['pollquestions']}] (
+     [qid] [int] NOT NULL ,
+     [pid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
+     [question] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
+ ) ON [PRIMARY]
+ ";
  
  $_SQL[] = "
  CREATE TABLE [dbo].[{$_TABLES['polltopics']}] (
      [pid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
!     [topic] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
      [voters] [numeric](8, 0) NULL ,
+     [questions] [int] NOT NULL ,
      [date] [datetime] NULL ,
!     [display] [tinyint] NOT NULL ,
!     [open] [tinyint] NOT NULL ,
!     [hideresults] [tinyint] NOT NULL ,
      [commentcode] [smallint] NOT NULL ,
      [statuscode] [smallint] NOT NULL ,
***************
*** 59,72 ****
      [perm_owner] [tinyint] NOT NULL ,
      [perm_group] [tinyint] NOT NULL ,
!     [perm_members] [tinyint]  NULL ,
!     [perm_anon] [tinyint]  NULL
  ) ON [PRIMARY]
  ";
  
- 
  $_SQL[] = "
  CREATE TABLE [dbo].[{$_TABLES['pollvoters']}] (
      [id] [numeric](10, 0) IDENTITY (1, 1) NOT NULL ,
!     [qid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
      [ipaddress] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
      [date] [numeric](10, 0) NULL
--- 69,81 ----
      [perm_owner] [tinyint] NOT NULL ,
      [perm_group] [tinyint] NOT NULL ,
!     [perm_members] [tinyint] NOT NULL ,
!     [perm_anon] [tinyint] NOT NULL
  ) ON [PRIMARY]
  ";
  
  $_SQL[] = "
  CREATE TABLE [dbo].[{$_TABLES['pollvoters']}] (
      [id] [numeric](10, 0) IDENTITY (1, 1) NOT NULL ,
!     [pid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
      [ipaddress] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
      [date] [numeric](10, 0) NULL
***************
*** 74,80 ****
  ";
  
- 
- 
- 
  $_SQL[] = "ALTER TABLE [dbo].[{$_TABLES['pollanswers']}] ADD
      CONSTRAINT [PK_gl_pollanswers] PRIMARY KEY  CLUSTERED
--- 83,86 ----
***************
*** 85,89 ****
  ";
  
! $_SQL[] = "ALTER TABLE [dbo].[{$_TABLES['polltopics']}] ADD
      CONSTRAINT [PK_gl_pollquestions] PRIMARY KEY  CLUSTERED
      (
--- 91,95 ----
  ";
  
! $_SQL[] = "ALTER TABLE [dbo].[{$_TABLES['pollquestions']}] ADD
      CONSTRAINT [PK_gl_pollquestions] PRIMARY KEY  CLUSTERED
      (
***************
*** 92,95 ****
--- 98,108 ----
  ";
  
+ $_SQL[] = "ALTER TABLE [dbo].[{$_TABLES['polltopics']}] ADD
+     CONSTRAINT [PK_gl_polltopics] PRIMARY KEY  CLUSTERED
+     (
+         [pid]
+     )  ON [PRIMARY]
+ ";
+ 
  $_SQL[] = "ALTER TABLE [dbo].[{$_TABLES['pollvoters']}] ADD
      CONSTRAINT [PK_gl_pollvoters] PRIMARY KEY  CLUSTERED
***************
*** 99,113 ****
  ";
  
  
  
  
! $_SQL[] = "INSERT INTO {$_TABLES['pollanswers']} (qid, aid, answer, votes) VALUES ('geeklogfeaturepoll',1,'Trackbacks',0)";
! $_SQL[] = "INSERT INTO {$_TABLES['pollanswers']} (qid, aid, answer, votes) VALUES ('geeklogfeaturepoll',2,'Links and Polls plugins',0)";
! $_SQL[] = "INSERT INTO {$_TABLES['pollanswers']} (qid, aid, answer, votes) VALUES ('geeklogfeaturepoll',3,'Revamped admin areas',0)";
! $_SQL[] = "INSERT INTO {$_TABLES['pollanswers']} (qid, aid, answer, votes) VALUES ('geeklogfeaturepoll',4,'FCKeditor included',0)";
! $_SQL[] = "INSERT INTO {$_TABLES['pollanswers']} (qid, aid, answer, votes) VALUES ('geeklogfeaturepoll',5,'Remote user authentication',0)";
! $_SQL[] = "INSERT INTO {$_TABLES['pollanswers']} (qid, aid, answer, votes) VALUES ('geeklogfeaturepoll',6,'Other',0)";
! 
! $_SQL[] = "INSERT INTO {$_TABLES['blocks']} (is_enabled, name, type, title, tid, blockorder, content, onleft, phpblockfn, owner_id, group_id, perm_owner, perm_group) VALUES (1,'polls_block','phpblock','Poll','all',30,'',0,'phpblock_polls',{$_USER['uid']},#group#,3,3)";
  
  ?>
--- 112,132 ----
  ";
  
+ // Note: The 'pollquestion' entry for the above answers is in the install script
  
+ $_SQL[] = "INSERT INTO {$_TABLES['blocks']} (is_enabled, name, type, title, tid, blockorder, content, onleft, phpblockfn, owner_id, group_id, perm_owner, perm_group) VALUES (1,'polls_block','phpblock','Poll','all',30,'',0,'phpblock_polls',{$_USER['uid']},#group#,3,3)";
  
+ $_SQL[] = "INSERT INTO {$_TABLES['pollanswers']} (pid, qid, aid, answer, votes, remark) VALUES ('geeklogfeaturepoll', 0, 1, 'MS SQL support', 0, '');";
+ $_SQL[] = "INSERT INTO {$_TABLES['pollanswers']} (pid, qid, aid, answer, votes, remark) VALUES ('geeklogfeaturepoll', 0, 2, 'Multi-language support', 0, '');";
+ $_SQL[] = "INSERT INTO {$_TABLES['pollanswers']} (pid, qid, aid, answer, votes, remark) VALUES ('geeklogfeaturepoll', 0, 3, 'Calendar as a plugin', 0, '');";
+ $_SQL[] = "INSERT INTO {$_TABLES['pollanswers']} (pid, qid, aid, answer, votes, remark) VALUES ('geeklogfeaturepoll', 0, 4, 'SLV spam protection', 0, '');";
+ $_SQL[] = "INSERT INTO {$_TABLES['pollanswers']} (pid, qid, aid, answer, votes, remark) VALUES ('geeklogfeaturepoll', 0, 5, 'Mass-delete users', 0, '');";
+ $_SQL[] = "INSERT INTO {$_TABLES['pollanswers']} (pid, qid, aid, answer, votes, remark) VALUES ('geeklogfeaturepoll', 0, 6, 'Other', 0, '');";
+ $_SQL[] = "INSERT INTO {$_TABLES['pollanswers']} (pid, qid, aid, answer, votes, remark) VALUES ('geeklogfeaturepoll', 1, 1, 'Story-Images', 0, '');";
+ $_SQL[] = "INSERT INTO {$_TABLES['pollanswers']} (pid, qid, aid, answer, votes, remark) VALUES ('geeklogfeaturepoll', 1, 2, 'User-Rights handling', 0, '');";
+ $_SQL[] = "INSERT INTO {$_TABLES['pollanswers']} (pid, qid, aid, answer, votes, remark) VALUES ('geeklogfeaturepoll', 1, 3, 'The Support', 0, '');";
+ $_SQL[] = "INSERT INTO {$_TABLES['pollanswers']} (pid, qid, aid, answer, votes, remark) VALUES ('geeklogfeaturepoll', 1, 4, 'Plugin Availability', 0, '');";
  
! $_SQL[] = "INSERT INTO {$_TABLES['pollquestions']} (qid, pid, question) VALUES (0, 'geeklogfeaturepoll', 'What is the best new feature of Geeklog?');";
! $_SQL[] = "INSERT INTO {$_TABLES['pollquestions']} (qid, pid, question) VALUES (1, 'geeklogfeaturepoll', 'What is the all-time best feature of Geeklog?');";
  
  ?>

Index: mysql_install.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/plugins/polls/sql/mysql_install.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** mysql_install.php	19 Jan 2008 14:53:12 -0000	1.9
--- mysql_install.php	2 May 2008 12:08:07 -0000	1.10
***************
*** 13,17 ****
  // |          Jason Whittenburg - jwhitten AT securitygeeks DOT com            |
  // |          Dirk Haun         - dirk AT haun-online DOT de                   |
! // |          Trinity Bays      - trinity AT steubentech DOT com               |
  // +---------------------------------------------------------------------------+
  // |                                                                           |
--- 13,17 ----
  // |          Jason Whittenburg - jwhitten AT securitygeeks DOT com            |
  // |          Dirk Haun         - dirk AT haun-online DOT de                   |
! // |          Trinity Bays      - trinity93 AT gmail DOT com                   |
  // +---------------------------------------------------------------------------+
  // |                                                                           |
***************
*** 95,111 ****
  $_SQL[] = "INSERT INTO {$_TABLES['blocks']} (is_enabled, name, type, title, tid, blockorder, content, onleft, phpblockfn, owner_id, group_id, perm_owner, perm_group) VALUES (1,'polls_block','phpblock','Poll','all',30,'',0,'phpblock_polls',{$_USER['uid']},#group#,3,3)";
  
! $_SQL[] = "INSERT INTO `{$_TABLES['pollanswers']}` (`pid`, `qid`, `aid`, `answer`, `votes`, `remark`) VALUES ('geeklogfeaturepoll', 0, 1, 'MS SQL support', 0, '');";
! $_SQL[] = "INSERT INTO `{$_TABLES['pollanswers']}` (`pid`, `qid`, `aid`, `answer`, `votes`, `remark`) VALUES ('geeklogfeaturepoll', 0, 2, 'Multi-language support', 0, '');";
! $_SQL[] = "INSERT INTO `{$_TABLES['pollanswers']}` (`pid`, `qid`, `aid`, `answer`, `votes`, `remark`) VALUES ('geeklogfeaturepoll', 0, 3, 'Calendar as a plugin', 0, '');";
! $_SQL[] = "INSERT INTO `{$_TABLES['pollanswers']}` (`pid`, `qid`, `aid`, `answer`, `votes`, `remark`) VALUES ('geeklogfeaturepoll', 0, 4, 'SLV spam protection', 0, '');";
! $_SQL[] = "INSERT INTO `{$_TABLES['pollanswers']}` (`pid`, `qid`, `aid`, `answer`, `votes`, `remark`) VALUES ('geeklogfeaturepoll', 0, 5, 'Mass-delete users', 0, '');";
! $_SQL[] = "INSERT INTO `{$_TABLES['pollanswers']}` (`pid`, `qid`, `aid`, `answer`, `votes`, `remark`) VALUES ('geeklogfeaturepoll', 0, 6, 'Other', 0, '');";
! $_SQL[] = "INSERT INTO `{$_TABLES['pollanswers']}` (`pid`, `qid`, `aid`, `answer`, `votes`, `remark`) VALUES ('geeklogfeaturepoll', 1, 1, 'Story-Images', 0, '');";
! $_SQL[] = "INSERT INTO `{$_TABLES['pollanswers']}` (`pid`, `qid`, `aid`, `answer`, `votes`, `remark`) VALUES ('geeklogfeaturepoll', 1, 2, 'User-Rights handling', 0, '');";
! $_SQL[] = "INSERT INTO `{$_TABLES['pollanswers']}` (`pid`, `qid`, `aid`, `answer`, `votes`, `remark`) VALUES ('geeklogfeaturepoll', 1, 3, 'The Support', 0, '');";
! $_SQL[] = "INSERT INTO `{$_TABLES['pollanswers']}` (`pid`, `qid`, `aid`, `answer`, `votes`, `remark`) VALUES ('geeklogfeaturepoll', 1, 4, 'Plugin Availability', 0, '');";
  
! $_SQL[] = "INSERT INTO `{$_TABLES['pollquestions']}` (`qid`, `pid`, `question`) VALUES (0, 'geeklogfeaturepoll', 'What is the best new feature of Geeklog?');";
! $_SQL[] = "INSERT INTO `{$_TABLES['pollquestions']}` (`qid`, `pid`, `question`) VALUES (1, 'geeklogfeaturepoll', 'What is the all-time best feature of Geeklog?');";
  
  ?>
--- 95,111 ----
  $_SQL[] = "INSERT INTO {$_TABLES['blocks']} (is_enabled, name, type, title, tid, blockorder, content, onleft, phpblockfn, owner_id, group_id, perm_owner, perm_group) VALUES (1,'polls_block','phpblock','Poll','all',30,'',0,'phpblock_polls',{$_USER['uid']},#group#,3,3)";
  
! $_SQL[] = "INSERT INTO {$_TABLES['pollanswers']} (pid, qid, aid, answer, votes, remark) VALUES ('geeklogfeaturepoll', 0, 1, 'MS SQL support', 0, '');";
! $_SQL[] = "INSERT INTO {$_TABLES['pollanswers']} (pid, qid, aid, answer, votes, remark) VALUES ('geeklogfeaturepoll', 0, 2, 'Multi-language support', 0, '');";
! $_SQL[] = "INSERT INTO {$_TABLES['pollanswers']} (pid, qid, aid, answer, votes, remark) VALUES ('geeklogfeaturepoll', 0, 3, 'Calendar as a plugin', 0, '');";
! $_SQL[] = "INSERT INTO {$_TABLES['pollanswers']} (pid, qid, aid, answer, votes, remark) VALUES ('geeklogfeaturepoll', 0, 4, 'SLV spam protection', 0, '');";
! $_SQL[] = "INSERT INTO {$_TABLES['pollanswers']} (pid, qid, aid, answer, votes, remark) VALUES ('geeklogfeaturepoll', 0, 5, 'Mass-delete users', 0, '');";
! $_SQL[] = "INSERT INTO {$_TABLES['pollanswers']} (pid, qid, aid, answer, votes, remark) VALUES ('geeklogfeaturepoll', 0, 6, 'Other', 0, '');";
! $_SQL[] = "INSERT INTO {$_TABLES['pollanswers']} (pid, qid, aid, answer, votes, remark) VALUES ('geeklogfeaturepoll', 1, 1, 'Story-Images', 0, '');";
! $_SQL[] = "INSERT INTO {$_TABLES['pollanswers']} (pid, qid, aid, answer, votes, remark) VALUES ('geeklogfeaturepoll', 1, 2, 'User-Rights handling', 0, '');";
! $_SQL[] = "INSERT INTO {$_TABLES['pollanswers']} (pid, qid, aid, answer, votes, remark) VALUES ('geeklogfeaturepoll', 1, 3, 'The Support', 0, '');";
! $_SQL[] = "INSERT INTO {$_TABLES['pollanswers']} (pid, qid, aid, answer, votes, remark) VALUES ('geeklogfeaturepoll', 1, 4, 'Plugin Availability', 0, '');";
  
! $_SQL[] = "INSERT INTO {$_TABLES['pollquestions']} (qid, pid, question) VALUES (0, 'geeklogfeaturepoll', 'What is the best new feature of Geeklog?');";
! $_SQL[] = "INSERT INTO {$_TABLES['pollquestions']} (qid, pid, question) VALUES (1, 'geeklogfeaturepoll', 'What is the all-time best feature of Geeklog?');";
  
  ?>




More information about the geeklog-cvs mailing list