PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /home/jairosvt/public_html/publicidadaf24/banners/etc/changes/
Server: Linux server2.noticiasdecolima.com 4.18.0-553.30.1.el8_10.x86_64 #1 SMP Tue Nov 26 02:30:26 EST 2024 x86_64
IP: 107.161.180.42
Choose File :

Url:
Dir : /home/jairosvt/public_html/publicidadaf24/banners/etc/changes/migration_tables_core_620.php

<?php

require_once(MAX_PATH . '/lib/OA/Upgrade/Migration.php');

class Migration_620 extends Migration
{
    public function __construct()
    {
        $this->aTaskList_constructive[] = 'beforeAddField__banners__iframe_friendly';
        $this->aTaskList_constructive[] = 'afterAddField__banners__iframe_friendly';

        $this->aObjectMap['banners']['iframe_friendly'] = ['fromTable' => 'banners', 'fromField' => 'iframe_friendly'];
    }

    public function beforeAddField__banners__iframe_friendly()
    {
        return $this->beforeAddField('banners', 'iframe_friendly');
    }

    public function afterAddField__banners__iframe_friendly()
    {
        return $this->afterAddField('banners', 'iframe_friendly') && $this->unfriendlyText();
    }

    public function unfriendlyText()
    {
        $prefix = $this->getPrefix();

        $oDbh = OA_DB::singleton();
        return $oDbh->exec("UPDATE {$prefix}banners SET iframe_friendly = 0 WHERE storagetype = 'txt'");
    }
}