Update of /cvsroot/phpwebsite-comm/modules/mailto/boost
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21138/modules/mailto/boost
Modified Files:
install.sql update.php
Log Message:
Added a pre-set subject option, also the ability to lock down the subject.
Did some convention clean-up.
Index: install.sql
===================================================================
RCS file: /cvsroot/phpwebsite-comm/modules/mailto/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 26 Mar 2004 18:56:49 -0000 1.1.1.1
--- install.sql 29 Mar 2004 21:08:01 -0000 1.2
***************
*** 11,14 ****
--- 11,16 ----
address text NOT NULL,
reqlogin smallint NOT NULL default '0',
+ subject text,
+ lock_subject smallint NOT NULL default '0',
PRIMARY KEY (id)
);
Index: update.php
===================================================================
RCS file: /cvsroot/phpwebsite-comm/modules/mailto/boost/update.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** update.php 26 Mar 2004 18:56:49 -0000 1.1.1.1
--- update.php 29 Mar 2004 21:08:01 -0000 1.2
***************
*** 1,10 ****
- /***
- * This is the boost update file for mailto
- *
- */
-
<?php
!
! if (!$_SESSION["OBJ_user"]->isDeity()){
header("location:index.php");
exit();
--- 1,4 ----
<?php
! if(!$_SESSION["OBJ_user"]->isDeity()) {
header("location:index.php");
exit();
***************
*** 13,15 ****
--- 7,30 ----
$status = 1;
+ if ($currentVersion < "0.1.1"){
+ if($GLOBALS['core']->query("ALTER TABLE mod_mailto_items ADD COLUMN `subject` " .
+ "text AFTER `reqlogin`", TRUE)) {
+ $content .= "Added database attribute for the subject.<br />";
+ } else {
+ $content .= "Boost failed to create the attribute 'subject' under the table 'mod_mailto_items'. <br /><br />";
+ $status = 0;
+ }
+
+ if($GLOBALS['core']->query("ALTER TABLE mod_mailto_items ADD COLUMN `lock_subject` " .
+ "smallint NOT NULL DEFAULT 0 AFTER `subject`", TRUE)) {
+ $content .= "Added database attribute to indicate if the subject should be locked. <br />";
+ } else {
+ $content .= "Boost failed to create the attribute 'lock_subject' under the table 'mod_mailto_items'. <br /><br />";
+ $status = 0;
+ }
+
+ $content .= "mailto successfully updated for version 0.1.1 changes.<br />";
+
+ }
+
?>
|