Plugin Directory

Changeset 2769404


Ignore:
Timestamp:
08/11/2022 03:16:34 PM (3 years ago)
Author:
planetshaker
Message:

fix issues with trustees

Location:
emergencywp/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • emergencywp/trunk/ajax/loadSystemEmail.php

    r2639152 r2769404  
    11<?php
     2
     3require_once("../../../../wp-load.php");
    24require_once "../cron/cron_config.php";
    35
    4 $email = sanitize_text_field(get_post(intval($_GET['pid'])));
     6$email = get_post(intval($_GET['pid']));
    57
    68$content = html_entity_decode($email->post_content);
     
    911<div class="modal-header" rel="2">
    1012    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
    11     <h4 class="modal-title" id="myModalLabel"><?php echo esc_html($email->post_title); ?></h4>
     13    <h4 class="modal-title" id="myModalLabel"><?php echo $email->post_title; ?></h4>
    1214</div>
    1315<div class="modal-body" rel="2">
    14     <?php echo esc_html_e($content); ?>
     16    <?php echo $content; ?>
    1517</div>
    1618<div class="modal-footer">
  • emergencywp/trunk/cron/cron_config.php

    r2639152 r2769404  
    11<?php
    22
    3 if( !defined('EMERGENCY_WP_PLUGIN_URL') ) define( 'EMERGENCY_WP_PLUGIN_URL', str_replace( 'cron/', '', plugin_dir_url( __FILE__ ) ) );
    4 if( !defined('EMERGENCY_WP_PLUGIN_DIR') ) define( 'EMERGENCY_WP_PLUGIN_DIR', str_replace( 'cron/', '', plugin_dir_path( __FILE__ ) ) );
     3if( !defined('EMERGENCY_WP_PLUGIN_URL') ) define( 'EMERGENCY_WP_PLUGIN_URL', str_replace( '/cron', '/', dirname( __FILE__ ) ) );
     4if( !defined('EMERGENCY_WP_PLUGIN_DIR') ) define( 'EMERGENCY_WP_PLUGIN_DIR', str_replace( '/cron', '/', dirname( __FILE__ ) ) );
    55
    66require_once EMERGENCY_WP_PLUGIN_DIR . 'lib/class.emergencyWPConfig.php';
  • emergencywp/trunk/cron/jobController.php

    r2639152 r2769404  
    11<?php
     2require_once("./wp-load.php");
     3
     4if( !defined('EMERGENCY_WP_PLUGIN_URL') ) define( 'EMERGENCY_WP_PLUGIN_URL', str_replace( '/cron', '/', dirname( __FILE__ ) ) );
     5if( !defined('EMERGENCY_WP_PLUGIN_DIR') ) define( 'EMERGENCY_WP_PLUGIN_DIR', str_replace( '/cron', '/', dirname( __FILE__ ) ) );
     6require_once EMERGENCY_WP_PLUGIN_DIR ."main.functions.php";
     7
    28$debugMode = 1;
    39$secret = emergencywp_option('cron_secret', '', true);
     
    221227                    $trustees_email_verification_date = new DateTime($trusty['postMeta']['emergencywp_trustees_approved']);
    222228                    if (is_object($trustees_email_verification_date)) {
    223                         if ($trustees_email_verification_date->getTimestamp() <= time() - $jobSettings['trustees_email_verification_interval']) {
     229                        if ($trustees_email_verification_date->getTimestamp() + $jobSettings['trustees_email_verification_interval'] <= time() ) {
    224230                            //Trustee send confirmation email
    225231                            $hasEmailConfirmationSent = get_post_meta($trusty['post']->ID, 'emergencywp_trustees_confirm_email_sent');
    226232                            if($hasEmailConfirmationSent == false) {
    227233                                update_post_meta($trusty['post']->ID, 'emergencywp_trustees_confirm_email_sent', date('Y-m-d H:i:s', time()));
     234                                //EmergencyWPTrusteesSystemEmails::setEmail($trustees_email_verification_date);
    228235                                EmergencyWPTrusteesSystemEmails::verifyTrusteeEmailLink($trusty['post']->ID);
    229236                            } else {
     
    243250                    }
    244251                }
     252
    245253                if(isset($trusty['postMeta']['emergencywp_trustees_confirm_email_sent'])) {
    246254                    $trustees_email_verification_date = new DateTime($trusty['postMeta']['emergencywp_trustees_confirm_email_sent']);
    247255                    if (is_object($trustees_email_verification_date)) {
    248                         if ($trustees_email_verification_date->getTimestamp() <= time() - $jobSettings['live_status_finalHoldB_reactionTimeTrustees']) {
     256                        if ($trustees_email_verification_date->getTimestamp() + $jobSettings['live_status_finalHoldB_reactionTimeTrustees'] <= time() ) {
    249257                            //Trustee didn't confirm his email
    250258                            $hasEmailNotificationSent = get_post_meta($trusty['post']->ID, 'emergencywp_trustees_email_changed_notification_sent');
     259                            //$hasEmailConfirmationSent = false;
    251260                            if($hasEmailNotificationSent == false) {
    252261                                update_post_meta($trusty['post']->ID, 'emergencywp_trustees_email_changed_notification_sent', date('Y-m-d H:i:s', time()));
    253                                 EmergencyWPTrusteesSystemEmails::notifyTrusteeEmailChanged($trusty['post']->ID);
     262                                EmergencyWPTrusteesSystemEmails::notifyMandatoryAboutPossibleTrusteeEmailChanged($trusty['post']->ID);
    254263                            }else {
    255264                                echo "<pre>";
  • emergencywp/trunk/emergencywp.php

    r2643491 r2769404  
    44Plugin URI: https://emergencyWP.net/
    55Description: EmergencyWP helps you plan processes for the case of personal emergencies right from your WordPress Dashboard. Pass over information to coworkers or clients automatically if you can't do it manually anymore (e.g. accidants, death, etc.). Plan life checks, setup contacts and messages and more. See our addons for more functionalities.
    6 Version: 1.3.8
     6Version: 1.3.10
    77Author: EmergencyWP Team, Albert Brückmann
    88Author URI: https://emergencywp.net/
     
    1515define('EMERGENCY_WP_PLUGIN_PATH', 'emergencywp/emergencywp.php');
    1616define('EMERGENCY_WP_PLUGIN_NAME', 'emergencywp');
    17 define('EMERGENCY_WP_VERSION', '1.3.8');
     17define('EMERGENCY_WP_VERSION', '1.3.10');
    1818define('EMERGENCY_WP_PLUGIN_URL', plugin_dir_url(__FILE__));
    1919define('EMERGENCY_WP_PLUGIN_DIR', plugin_dir_path(__FILE__));
  • emergencywp/trunk/pages/emergencywp/setting_tabs/email_logs.php

    r2639152 r2769404  
    7979                case 'live_status_hold_b':
    8080                case 'emergency_user_email':
     81                case 'trustee_email_change':
    8182                    // Mandator emails
    8283                    $mandatorData = emergencyWPAdmin::getMandatorData(get_current_blog_id());
Note: See TracChangeset for help on using the changeset viewer.