From: Verdon V. <ve...@us...> - 2009-02-19 20:32:39
|
Update of /cvsroot/phpwebsite-comm/modules/elections/boost In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11368/boost Modified Files: install.sql uninstall.php Removed Files: install.php uninstall.sql update.php Log Message: preparing for 2.0.0 Index: install.sql =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/elections/boost/install.sql,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** install.sql 14 Nov 2006 00:50:49 -0000 1.1.1.1 --- install.sql 19 Feb 2009 20:31:59 -0000 1.2 *************** *** 1,62 **** ! CREATE TABLE mod_elections_settings ( ! enable_elections smallint NOT NULL default '1', ! enable_sidebox smallint NOT NULL default '0', ! sidebox_homeonly smallint NOT NULL default '0', ! sidebox_text varchar(255), ! enableImages smallint NOT NULL default '0', ! maxImgWidth int NOT NULL DEFAULT '1600', ! maxImgHeight int NOT NULL DEFAULT '1600', ! maxImgSize int NOT NULL DEFAULT '200000', ! useResize smallint NOT NULL DEFAULT '0', ! resizeWidth int NOT NULL DEFAULT '500', ! resizeHeight int NOT NULL DEFAULT '500', ! thumbWidth int NOT NULL DEFAULT '100', ! thumbHeight int NOT NULL DEFAULT '100' ! ); ! ! INSERT INTO mod_elections_settings VALUES ('1', '0', '0', '', '1', '1600', '1600', '200000', '1', '500', '500', '100', '100'); ! CREATE TABLE mod_elections_elections ( ! election_id int NOT NULL default '0', ! title varchar(255), ! description text, ! pubview smallint NOT NULL default '0', ! pubvote smallint NOT NULL default '0', ! votegroups text DEFAULT NULL, ! opening datetime NOT NULL, ! closing datetime NOT NULL, ! showin_block smallint NOT NULL default '1', ! maxchoice int NOT NULL DEFAULT '1', ! custom1label varchar(255), ! custom2label varchar(255), ! custom3label varchar(255), ! custom4label varchar(255), ! PRIMARY KEY (election_id) ); ! CREATE TABLE mod_elections_candidates ( ! candidate_id int NOT NULL default '0', ! election_id int NOT NULL default '0', title varchar(255), description text, ! image text, ! votes int NOT NULL default '0', custom1 varchar(255), custom2 varchar(255), custom3 varchar(255), custom4 varchar(255), ! PRIMARY KEY (candidate_id), ! index (election_id) ); ! CREATE TABLE mod_elections_voters ( ! voter_id int NOT NULL default '0', ! election_id int NOT NULL default '0', username varchar(255), ! votedate datetime NOT NULL, ! ip varchar(255) NULL, ! PRIMARY KEY (voter_id), ! index (election_id) ); - - --- 1,52 ---- ! -- elections - phpwebsite module ! -- @version $Id$ ! -- @author Verdon Vaillancourt <verdonv at users dot sourceforge dot net> ! CREATE TABLE elections_ballots ( ! id int not null default 0, ! key_id int not null default 0, ! title varchar(255), ! description text, ! image_id int not null default 0, ! pubview smallint not null default 0, ! pubvote smallint not null default 0, ! votegroups text default null, ! opening int not null default 0, ! closing int not null default 0, ! showin_block smallint not null default 1, ! minchoice int not null default 1, ! maxchoice int not null default 1, ! ranking smallint not null default 0, ! custom1label varchar(255), ! custom2label varchar(255), ! custom3label varchar(255), ! custom4label varchar(255), ! PRIMARY KEY (id) ); ! CREATE INDEX electionsballots_idx on elections_ballots(key_id); ! ! CREATE TABLE elections_candidates ( ! id int not null default 0, ! ballot_id int not null default 0, title varchar(255), description text, ! image_id int not null default 0, ! votes int not null default 0, custom1 varchar(255), custom2 varchar(255), custom3 varchar(255), custom4 varchar(255), ! PRIMARY KEY (id), ! index (ballot_id) ); ! CREATE TABLE elections_votes ( ! id int not null default 0, ! ballot_id int not null default 0, username varchar(255), ! votedate int not null default 0, ! ip varchar(255) null, ! PRIMARY KEY (id), ! index (ballot_id) ); Index: uninstall.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/elections/boost/uninstall.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** uninstall.php 14 Nov 2006 00:50:50 -0000 1.1.1.1 --- uninstall.php 19 Feb 2009 20:31:59 -0000 1.2 *************** *** 1,59 **** ! <?php ! /** ! * elections ! * ! * See docs/AUTHORS and docs/COPYRIGHT for relevant info. ! * ! * This program is free software; you can redistribute it and/or modify ! * it under the terms of the GNU General Public License as published by ! * the Free Software Foundation; either version 2 of the License, or ! * (at your option) any later version. ! * ! * This program is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! * GNU General Public License for more details. ! * ! * You should have received a copy of the GNU General Public License ! * along with this program; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! * @version $Id$ ! */ ! ! if (!$_SESSION['OBJ_user']->isDeity()){ ! header('location:index.php'); ! exit(); ! } ! ! if ($GLOBALS['core']->sqlImport($core->source_dir.'mod/elections/boost/uninstall.sql', 1, 1)) { ! $content .= 'All Elections tables successfully removed.<br />'; ! ! ! $content .= 'Removing images directory ' . PHPWS_SOURCE_DIR . 'images/elections<br />'; ! require_once (PHPWS_SOURCE_DIR . "core/File.php"); ! if (PHPWS_File::rmdir($GLOBALS['core']->home_dir . 'images/elections/')) { ! $content .= 'The Elections images directory was fully removed.<br />'; ! } else { ! $content .= 'The Elections images directory could not be removed.<br />'; ! } ! ! if(isset($_SESSION["OBJ_menuman"])) { ! if($GLOBALS["core"]->sqlDelete("mod_menuman_items", "menu_item_url", "%module=elections%", "LIKE")) ! $content .= "Removed link(s) to Elections from menu.<br />"; ! } ! ! // Remove help information ! require_once(PHPWS_SOURCE_DIR . 'mod/help/class/CLS_help.php'); ! CLS_help::uninstall_help('elections'); ! ! // Remove translation ! require_once(PHPWS_SOURCE_DIR . 'mod/language/class/Language.php'); ! PHPWS_Language::uninstallLanguages('elections'); ! ! $status = 1; ! } else { ! $content .= 'There was a problem accessing the database.<br />'; ! } ! ! ?> --- 1,34 ---- ! <?php ! /** ! * elections - phpwebsite module ! * ! * See docs/AUTHORS and docs/COPYRIGHT for relevant info. ! * ! * This program is free software; you can redistribute it and/or modify ! * it under the terms of the GNU General Public License as published by ! * the Free Software Foundation; either version 2 of the License, or ! * (at your option) any later version. ! * ! * This program is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! * GNU General Public License for more details. ! * ! * You should have received a copy of the GNU General Public License ! * along with this program; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! * @version $Id$ ! * @author Verdon Vaillancourt <verdonv at users dot sourceforge dot net> ! */ ! ! function elections_uninstall(&$content) { ! ! PHPWS_DB::dropTable('elections_ballots'); ! PHPWS_DB::dropTable('elections_candidates'); ! PHPWS_DB::dropTable('elections_votes'); ! $content[] = dgettext('elections', 'Elections tables dropped.'); ! ! return true; ! } ! ?> \ No newline at end of file --- install.php DELETED --- --- uninstall.sql DELETED --- --- update.php DELETED --- |