Changeset 686
- Timestamp:
- 12/21/09 16:58:44 (2 years ago)
- Location:
- trunk/phpbms/modules
- Files:
-
- 1 removed
- 7 modified
-
api/push_record_ajax.php (deleted)
-
base/cron.php (modified) (1 diff)
-
base/include/scheduler.php (modified) (1 diff)
-
mailchimp/adminsettings.php (modified) (4 diffs)
-
mailchimp/install/settings.sql (modified) (1 diff)
-
mailchimp/manual_list_sync_ajax.php (modified) (1 diff)
-
mailchimp/scheduler_list_sync.php (modified) (3 diffs)
-
mailchimp/version.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpbms/modules/base/cron.php
r665 r686 30 30 `scheduler`.`pushrecordid`, 31 31 `scheduler`.startdatetime, 32 `scheduler`.enddatetime, 32 `scheduler`.enddatetime 33 "; 34 35 if(moduleExists("mod:b2d42220-443b-fe74-dbdb-ed2c0968c38c", $phpbms->modules)){ 36 $querystatement .= " 37 , 33 38 `tabledefs`.`maintable`, 34 39 `modules`.`name` AS `modulename` 35 40 FROM 41 "; 42 $querystatement .= " 36 43 (((scheduler LEFT JOIN `pushrecords` ON `scheduler`.`pushrecordid` = `pushrecords`.`uuid`) LEFT JOIN `tabledefs` ON `pushrecords`.`originuuid` = `tabledefs`.`uuid`) LEFT JOIN `modules` ON `tabledefs`.`moduleid` = `modules`.`uuid`) 37 WHERE 38 inactive = 0 39 AND startdatetime < NOW() 40 AND (enddatetime > NOW() OR enddatetime IS NULL) 44 "; 45 }else{ 46 $querystatement .= " 47 FROM 48 "; 49 $querystatement .= " 50 `scheduler` 51 "; 52 }//end if 53 54 $querystatement .= " WHERE 55 `scheduler`.inactive = '0' 56 AND `scheduler`.startdatetime < NOW() 57 AND (`scheduler`.enddatetime > NOW() OR `scheduler`.enddatetime IS NULL) 41 58 "; 42 59 -
trunk/phpbms/modules/base/include/scheduler.php
r663 r686 151 151 $variables["enddatetime"] = NULL; 152 152 153 154 if(!isset($variables["scripttype"])) 155 $variables["scripttype"] = "job"; 156 153 157 switch($variables["scripttype"]){ 154 158 -
trunk/phpbms/modules/mailchimp/adminsettings.php
r685 r686 113 113 "field_type"=>"text" 114 114 ); 115 $api->listMergeVarAdd($variables["mailchimp_list_id"], "UUID", "php bmsunique user id", $req);115 $api->listMergeVarAdd($variables["mailchimp_list_id"], "UUID", "phpBMS unique user id", $req); 116 116 if($api->errorCode){ 117 117 unset($variables["mailchimp_list_id"]); … … 184 184 global $db; 185 185 186 $theinput = new inputField("mailchimp_apikey",$therecord["mailchimp_apikey"],"MailChimp Apikey", false, NULL, 48); 187 $fields[] = $theinput; 188 189 $theinput = new inputCheckbox("mailchimp_secure", $therecord["mailchimp_secure"], "Use SSL Connection"); 190 $fields[] = $theinput; 191 192 $theinput = new inputField("mailchimp_batch_limit", $therecord["mailchimp_batch_limit"], "Batch Limit"); 193 $fields[] = $theinput; 194 195 $theinput = new inputField("mailchimp_list_id", $therecord["mailchimp_list_id"], "List Id"); 196 $fields[] = $theinput; 197 198 $theinput = new inputField("mailchimp_last_sync_date", $therecord["mailchimp_last_sync_date"], "Last Sync Date"); 186 $theinput = new inputField("mailchimp_apikey",$therecord["mailchimp_apikey"],"mailchimp apikey", false, NULL, 48); 187 $fields[] = $theinput; 188 189 $theinput = new inputCheckbox("mailchimp_secure", $therecord["mailchimp_secure"], "use ssl connection"); 190 $fields[] = $theinput; 191 192 $theinput = new inputField("mailchimp_list_id", $therecord["mailchimp_list_id"], "list id"); 193 $fields[] = $theinput; 194 195 $theinput = new inputField("mailchimp_last_sync_date", $therecord["mailchimp_last_sync_date"], "last sync date"); 199 196 $theinput->setAttribute("class", "uneditable"); 200 197 $theinput->setAttribute("readonly", "readonly"); … … 212 209 213 210 <input type="hidden" id="apikey_changed" name="apikey_changed" value="0" /> 211 212 <p> 213 <span class="notes"> 214 To use this module, you need to create an account with MailChimp 215 (<a href="http://mailchimp.com">http://mailchimp.com</a>). 216 </span> 217 </p> 218 214 219 <p> 215 220 <?php echo $theform->showField("mailchimp_apikey");?> … … 234 239 </p> 235 240 <p><?php echo $theform->showField("mailchimp_secure");?></p> 236 <?php /*echo $theform->showField("mailchimp_batch_limit");*/?>237 241 <p><?php echo $theform->showField("mailchimp_last_sync_date");?></p> 238 242 -
trunk/phpbms/modules/mailchimp/install/settings.sql
r677 r686 1 1 INSERT INTO `settings` (`name`, `value`) VALUES ('mailchimp_apikey',''); 2 2 INSERT INTO `settings` (`name`, `value`) VALUES ('mailchimp_secure','0'); 3 INSERT INTO `settings` (`name`, `value`) VALUES ('mailchimp_batch_limit','500');4 3 INSERT INTO `settings` (`name`, `value`) VALUES ('mailchimp_list_id',''); 5 4 INSERT INTO `settings` (`name`, `value`) VALUES ('mailchimp_last_sync_date',''); -
trunk/phpbms/modules/mailchimp/manual_list_sync_ajax.php
r681 r686 10 10 MAILCHIMP_LIST_ID, 11 11 MAILCHIMP_LAST_SYNC_DATE, 12 MAILCHIMP_BATCH_LIMIT,12 NULL, 13 13 MAILCHIMP_SECURE 14 14 ); -
trunk/phpbms/modules/mailchimp/scheduler_list_sync.php
r684 r686 1 1 <?php 2 2 //uncomment if need debug 3 //if(!class_exists("appError")) 4 // include_once("../../include/session.php"); 3 if(!class_exists("appError")) 4 include_once("../../include/session.php"); 5 5 6 include("include/MCAPI.class.php");//for MCAPI CLASS (listSync class uses it) 6 7 include("include/list_sync.php");//for listSync class … … 12 13 MAILCHIMP_LIST_ID, 13 14 MAILCHIMP_LAST_SYNC_DATE, 14 MAILCHIMP_BATCH_LIMIT,15 NULL, 15 16 MAILCHIMP_SECURE 16 17 ); … … 20 21 if(isset($response["type"])){ 21 22 22 if($response["type"] == "error")23 if($response["type"] != "success") 23 24 foreach($response["details"] AS $errorArray){ 24 25 25 $message = "MailChimp sync failure: ".$errorArray["message"]." (".$errorArray["code"].")";26 $message = "MailChimp sync ".$response["type"].": ".$errorArray["message"]." (".$errorArray["code"].")"; 26 27 $log = new phpbmsLog($message, "SCHEDULER", NULL, $db); 27 28 -
trunk/phpbms/modules/mailchimp/version.php
r679 r686 9 9 10 10 $modules["mailchimp"]["requirements"] = 11 "phpBMS Core v0.98 or greater; BMS module v0.98 or greater .";11 "phpBMS Core v0.98 or greater; BMS module v0.98 or greater; A MailChimp account (http://www.mailchimp.com/)."; 12 12 13 13 ?>