0xsec Shell
0xSec


Server : LiteSpeed
System : Linux webbox1.ncrdns.net 5.14.0-611.55.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 19 15:19:29 EDT 2026 x86_64
User : rahcos ( 1533)
PHP Version : 8.4.24
Disable Function : NONE
Directory :  /home4/rahcos/.trash/wp-content/plugins/fluentform/app/Services/FormBuilder/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home4/rahcos/.trash/wp-content/plugins/fluentform/app/Services/FormBuilder/NotificationParser.php
<?php

namespace FluentForm\App\Services\FormBuilder;

use FluentForm\App\Services\FormBuilder\ShortCodeParser;

class NotificationParser
{
    protected static $cache = null;

    /**
     * Parse Norifications
     *
     * @param array  $notifications
     * @param int    $insertId
     * @param array  $data
     * @param object $form
     *
     * @return bool $cache
     */
    public static function parse($notifications, $insertId, $data, $form, $cache = true)
    {
        if ($cache && ! is_null(static::$cache)) {
            return static::$cache;
        }

        foreach ($notifications as &$notification) {
            static::setRecepient($notification, $data);

            $notification = ShortCodeParser::parse(
                $notification,
                $insertId,
                $data,
                $form
            );
        }

        return $cache ? (static::$cache = $notifications) : $notifications;
    }

    protected static function setRecepient(&$notification, $data)
    {
        if (isset($notification['sendTo']) && 'field' == $notification['sendTo']['type']) {
            $notification['sendTo']['email'] = $data[$notification['sendTo']['field']];
        }
    }
}

c0oded By c0rpz