This is the API documentation for concrete5 version 5.6 and earlier. View Current API Documentation
 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 
<?php

defined('C5_EXECUTE') or die("Access Denied.");
class ConcreteUpgradeVersion561Helper {

    
    public $dbRefreshTables = array(
        'Blocks',
        'CollectionVersionBlocksOutputCache',
        'PermissionAccessList'
    );

    public function run() {
        $sp = Page::getByPath('/dashboard/system/seo/excluded');
        if (!is_object($sp) || $sp->isError()) {
            $sp = SinglePage::add('/dashboard/system/seo/excluded');
            $sp->update(array('cName'=>t('Excluded URL Word List')));
            $sp->setAttribute('meta_keywords', 'pretty, slug');
        }
        $bt = BlockType::getByHandle('next_previous');
        if (is_object($bt)) {
            $bt->refresh();
        }

        $db = Loader::db();
        $columns = $db->MetaColumns('Pages');
        if (isset($columns['PTID'])) {
            $db->Execute('alter table Pages drop column ptID');
        }

        if (isset($columns['CTID'])) {
            $db->Execute('alter table Pages drop column ctID');
        }

        $bt = BlockType::getByHandle('search');
        if (is_object($bt)) {
            $bt->refresh();
        }
    }

    
}