Plugin Directory

Changeset 2100320


Ignore:
Timestamp:
06/04/2019 10:16:34 AM (7 years ago)
Author:
mouveo
Message:

Version : 1.3.7

Location:
contactic/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • contactic/trunk/ContacticPlugin.php

    r2067294 r2100320  
    942942                $cf7->posted_data['_ctc_last_page_uri'] = $_SESSION['_ctc_last_page_uri'];
    943943            }
     944           
     945            $slack_message = '';
    944946
    945947            foreach ($cf7->posted_data as $name => $value) {
     
    978980                        $valueClean,
    979981                        $order++));
     982                    if (substr($nameClean, 0, 5) != '_ctc_'){
     983                        $slack_message .= '*'.$nameClean.'*'.chr(10);
     984                        $slack_message .= $valueClean.chr(10).chr(10);
     985                    }
    980986                }
    981987            }
     
    10431049                    if($webhookConf['webhook_type'] == 'slack' && $slackWebhook !== '') {
    10441050                        if ($webhookConf['formTrigger'][0] == '*') {
    1045                             $this->slackNotification($slackWebhook, $webhookConf);
     1051                            $this->slackNotification($slackWebhook, $webhookConf, $slack_message);
    10461052                        } else if (in_array($title, $webhookConf['formTrigger'])) {
    1047                             $this->slackNotification($slackWebhook, $webhookConf);
     1053                            $this->slackNotification($slackWebhook, $webhookConf, $slack_message);
    10481054                        } else {
    10491055                            // do nothing...
     
    10821088     * @return boolean true succeeded
    10831089     */
    1084     public function slackNotification($webhook, $webhookConf) {
     1090    public function slackNotification($webhook, $webhookConf, $slack_message) {
    10851091
    10861092
     
    10891095            'username' => 'contactic-bot',
    10901096            'icon_url' => '',
    1091             'channel' => '#général'
     1097            'channel' => '#général',
    10921098        );
    10931099
     
    10971103        if (isset($webhookConf['SlackIconUrl'])) $payload['icon_url'] = $webhookConf['SlackIconUrl'];
    10981104
     1105        $payload['text'] .= chr(10).chr(10).$slack_message;
    10991106
    11001107        $post_data = json_encode($payload);
     
    11901197            $displayName . ' Overview',
    11911198            __('Overview', 'contactic'),
    1192             'manage_options',
     1199            $this->roleToCapability($roleAllowed),
    11931200            $menuSlug,
    11941201            array(&$this, 'showOverviewPage')
     
    11981205            $displayName . ' Contacts',
    11991206            __('Contacts', 'contactic'),
    1200             'manage_options',
     1207            $this->roleToCapability($roleAllowed),
    12011208            $this->getSlug('submissions'),
    12021209            array(&$this, 'whatsInTheDBPage')
     
    12501257                         $displayName . ' Shortcode Builder',
    12511258                         __('Shortcodes', 'contactic'),
    1252                          $this->roleToCapability($roleAllowed),
     1259                         $this->roleToCapability('Administrator'),
    12531260                         $this->getSlug('shortcodes'),
    12541261                         array(&$this, 'showShortCodeBuilderPage'));
  • contactic/trunk/contact-form-7-db.php

    r2100273 r2100320  
    33 * Plugin Name: Contactic
    44 * Plugin URI: https://contactic.io/
    5  * Version: 1.3.5
     5 * Version: 1.3.7
    66 * Author: Contactic
    77 * Author URI: https://contactic.io/
  • contactic/trunk/readme.txt

    r2100273 r2100320  
    33Tags: 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
    44Requires at least: 4.0
    5 Tested up to: 5.1
     5Tested up to: 5.2
    66Requires PHP: 5.4.45
    7 Stable tag: 1.3.5
     7Stable tag: 1.3.7
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    125125== Changelog ==
    126126
     127= 1.3.7 =
     128* Add form data to slack bot notifications
     129
     130= 1.3.6 =
     131* Fix security settings roles
     132
    127133= 1.3.5 =
    128134* Save state of datatables on contacts page
Note: See TracChangeset for help on using the changeset viewer.