Changeset 2100320
- Timestamp:
- 06/04/2019 10:16:34 AM (7 years ago)
- Location:
- contactic/trunk
- Files:
-
- 3 edited
-
ContacticPlugin.php (modified) (9 diffs)
-
contact-form-7-db.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
contactic/trunk/ContacticPlugin.php
r2067294 r2100320 942 942 $cf7->posted_data['_ctc_last_page_uri'] = $_SESSION['_ctc_last_page_uri']; 943 943 } 944 945 $slack_message = ''; 944 946 945 947 foreach ($cf7->posted_data as $name => $value) { … … 978 980 $valueClean, 979 981 $order++)); 982 if (substr($nameClean, 0, 5) != '_ctc_'){ 983 $slack_message .= '*'.$nameClean.'*'.chr(10); 984 $slack_message .= $valueClean.chr(10).chr(10); 985 } 980 986 } 981 987 } … … 1043 1049 if($webhookConf['webhook_type'] == 'slack' && $slackWebhook !== '') { 1044 1050 if ($webhookConf['formTrigger'][0] == '*') { 1045 $this->slackNotification($slackWebhook, $webhookConf );1051 $this->slackNotification($slackWebhook, $webhookConf, $slack_message); 1046 1052 } else if (in_array($title, $webhookConf['formTrigger'])) { 1047 $this->slackNotification($slackWebhook, $webhookConf );1053 $this->slackNotification($slackWebhook, $webhookConf, $slack_message); 1048 1054 } else { 1049 1055 // do nothing... … … 1082 1088 * @return boolean true succeeded 1083 1089 */ 1084 public function slackNotification($webhook, $webhookConf ) {1090 public function slackNotification($webhook, $webhookConf, $slack_message) { 1085 1091 1086 1092 … … 1089 1095 'username' => 'contactic-bot', 1090 1096 'icon_url' => '', 1091 'channel' => '#général' 1097 'channel' => '#général', 1092 1098 ); 1093 1099 … … 1097 1103 if (isset($webhookConf['SlackIconUrl'])) $payload['icon_url'] = $webhookConf['SlackIconUrl']; 1098 1104 1105 $payload['text'] .= chr(10).chr(10).$slack_message; 1099 1106 1100 1107 $post_data = json_encode($payload); … … 1190 1197 $displayName . ' Overview', 1191 1198 __('Overview', 'contactic'), 1192 'manage_options',1199 $this->roleToCapability($roleAllowed), 1193 1200 $menuSlug, 1194 1201 array(&$this, 'showOverviewPage') … … 1198 1205 $displayName . ' Contacts', 1199 1206 __('Contacts', 'contactic'), 1200 'manage_options',1207 $this->roleToCapability($roleAllowed), 1201 1208 $this->getSlug('submissions'), 1202 1209 array(&$this, 'whatsInTheDBPage') … … 1250 1257 $displayName . ' Shortcode Builder', 1251 1258 __('Shortcodes', 'contactic'), 1252 $this->roleToCapability( $roleAllowed),1259 $this->roleToCapability('Administrator'), 1253 1260 $this->getSlug('shortcodes'), 1254 1261 array(&$this, 'showShortCodeBuilderPage')); -
contactic/trunk/contact-form-7-db.php
r2100273 r2100320 3 3 * Plugin Name: Contactic 4 4 * Plugin URI: https://contactic.io/ 5 * Version: 1.3. 55 * Version: 1.3.7 6 6 * Author: Contactic 7 7 * Author URI: https://contactic.io/ -
contactic/trunk/readme.txt
r2100273 r2100320 3 3 Tags: CF7, contact form 7, CFDB, contact form, database, contact form database, save contact form, form database, contactic, form, forms, form builder, contact form, feedback, custom form, contact, web contact form, email, form manager, survey 4 4 Requires at least: 4.0 5 Tested up to: 5. 15 Tested up to: 5.2 6 6 Requires PHP: 5.4.45 7 Stable tag: 1.3. 57 Stable tag: 1.3.7 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 125 125 == Changelog == 126 126 127 = 1.3.7 = 128 * Add form data to slack bot notifications 129 130 = 1.3.6 = 131 * Fix security settings roles 132 127 133 = 1.3.5 = 128 134 * Save state of datatables on contacts page
Note: See TracChangeset
for help on using the changeset viewer.