Beispiel #1
0
 public function run()
 {
     $bt = BlockType::getByHandle('guestbook');
     if (is_object($bt)) {
         $bt->refresh();
     }
 }
Beispiel #2
0
 public function run()
 {
     // Since we added the origfilename column in 5.0.0b1 we need to populate it
     Loader::block('library_file');
     $bl = new LibraryFileBlockController();
     $bl->populateOriginalFilenames();
     // install the new block types made available
     BlockType::installBlockType('flash_content');
     BlockType::installBlockType('guestbook');
     BlockType::installBlockType('slideshow');
     BlockType::installBlockType('search');
     BlockType::installBlockType('google_map');
     BlockType::installBlockType('video');
     BlockType::installBlockType('rss_displayer');
     BlockType::installBlockType('youtube');
     BlockType::installBlockType('survey');
     // rename external form
     $bt = BlockType::getByHandle('custom_form');
     $db = Loader::db();
     $tables = $db->MetaTables('TABLES');
     if (isset($tables['btCustomForm']) && !isset($tables['btExternalForm'])) {
         $db->Execute("alter table btCustomForm rename btExternalForm");
     }
     if (is_object($bt)) {
         BlockType::installBlockType('external_form', $bt->getBlockTypeID());
     }
     // add new theme
     $th = PageTheme::getByHandle('greensalad');
     if (!is_object($th)) {
         PageTheme::add('greensalad');
     }
 }
 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();
     }
 }
 public function run()
 {
     $bt = BlockType::getByHandle('youtube');
     if (is_object($bt)) {
         $bt->refresh();
     }
 }
 public function up(Schema $schema)
 {
     $bt = \BlockType::getByHandle('image_slider');
     if (is_object($bt)) {
         $bt->refresh();
     }
 }
 public function run()
 {
     $bt = BlockType::getByHandle('google_map');
     if (is_object($bt) && !$bt->isError()) {
         $bt->refresh();
     }
 }
Beispiel #7
0
 public function view()
 {
     $uh = Loader::helper('concrete/urls');
     $bt = BlockType::getByHandle('switch_language');
     Loader::model('section', 'multilingual');
     $ml = MultilingualSection::getList();
     $c = Page::getCurrentPage();
     $al = MultilingualSection::getBySectionOfSite($c);
     $languages = array();
     $locale = ACTIVE_LOCALE;
     if (is_object($al)) {
         $locale = $al->getLanguage();
     }
     foreach ($ml as $m) {
         $languages[$m->getCollectionID()] = $m->getLanguageText($locale) . ' ' . (strlen($m->msIcon) ? '(' . $m->msIcon . ')' : '');
     }
     $this->set('languages', $languages);
     $this->set('languageSections', $ml);
     $this->set('action', $uh->getBlockTypeToolsURL($bt) . '/switch');
     if (is_object($al)) {
         $this->set('activeLanguage', $al->getCollectionID());
     }
     $pkg = Package::getByHandle('multilingual');
     $mdl = Loader::helper('default_language', 'multilingual');
     $this->set('defaultLanguage', $mdl->getSessionDefaultLocale());
     $this->set('cID', $c->getCollectionID());
 }
 public function addBlock($blockTypeHandle)
 {
     $bt = BlockType::getByHandle($blockTypeHandle);
     $cct = ComposerControlType::getByHandle('block');
     $control = $ctca->getPageTypeComposerControlByIdentifier($bt->getBlockID());
     // add control
     $composerFLS = $control->addToPageTypeComposerFormLayoutSet($this->layoutSet);
 }
 public function up(Schema $schema)
 {
     // added new delimiter settings.
     $bt = \BlockType::getByHandle('page_attribute_display');
     if (is_object($bt)) {
         $bt->refresh();
     }
 }
Beispiel #10
0
	public function save() {	
		if (isset($this->notesBlock)) {
			$this->notesBlock->delete();
		}		
		$data['content'] = $this->post('dashboard_notes');
		$bt = BlockType::getByHandle('content');
		$this->uc->addBlock($bt, 'dashboard_notes', $data);
		$this->redirect('/dashboard/', 'module','notes','notes_saved'); 
	}
 private function getOrInstallBlockType($pkg, $btHandle)
 {
     $bt = BlockType::getByHandle($btHandle);
     if (empty($bt)) {
         BlockType::installBlockTypeFromPackage($btHandle, $pkg);
         $bt = BlockType::getByHandle($btHandle);
     }
     return $bt;
 }
Beispiel #12
0
 private function block_name_for_handle($handle)
 {
     if (empty($handle)) {
         return '';
     } else {
         $bt = BlockType::getByHandle($handle);
         return is_object($bt) ? $bt->getBlockTypeName() : '';
     }
 }
Beispiel #13
0
 public function uninstall()
 {
     BlockType::getByHandle('tweetcrete')->controller->uninstall();
     parent::uninstall();
     //make sure the block table gets dropped
     $db = Loader::db();
     $db->Execute('DROP TABLE IF EXISTS btTweetcrete');
     $db->Execute('DROP TABLE IF EXISTS btTweetcreteUserOrHashSettings');
 }
 public function up(Schema $schema)
 {
     $bt = \BlockType::getByHandle('file');
     if (is_object($bt)) {
         $bt->refresh();
     }
     if (\Config::get('conversation.banned_words')) {
         \Config::set('conversations.banned_words', true);
     }
 }
Beispiel #15
0
	public function run() {
		$bt = BlockType::getByHandle('image');
		if (is_object($bt)) { 
			$bt->refresh();
		}
		$bt = BlockType::getByHandle('form');
		if (is_object($bt)) { 
			$bt->refresh();
		}
	}
 public function up(Schema $schema)
 {
     try {
         $table = $schema->getTable('SystemDatabaseQueryLog');
         $table->addColumn('ID', 'integer', array('unsigned' => true, 'autoincrement' => true));
         $table->setPrimaryKey(array('ID'));
     } catch (\Exception $e) {
     }
     $db = \Database::connection();
     $db->executeQuery("DELETE FROM FileSetFiles WHERE fID NOT IN (SELECT fID FROM Files)");
     $db->executeQuery("DELETE FROM FileSearchIndexAttributes WHERE fID NOT IN (SELECT fID FROM Files)");
     $db->executeQuery("DELETE FROM DownloadStatistics WHERE fID NOT IN (SELECT fID FROM Files)");
     $db->executeQuery("DELETE FROM FilePermissionAssignments WHERE fID NOT IN (SELECT fID FROM Files)");
     $bt = \BlockType::getByHandle('page_list');
     if (is_object($bt)) {
         $bt->refresh();
     }
 }
 function testCoreImageBlockWithNoOverridesHasCorrectTemplates()
 {
     // Test a.
     $p = Page::getByID(1);
     $blocks = $p->getBlocks('Header');
     $b = $blocks[0];
     $bvt = new BlockViewTemplate($b);
     $this->assertEqual($bvt->getTemplate(), DIR_BASE_CORE . '/blocks/image/view.php', 'Test A');
     // Test b.
     $bt = BlockType::getByHandle('image');
     global $a, $ap, $c, $cp;
     if (is_object($bt)) {
         ob_start();
         $bv = new BlockView();
         $bv->render($bt, 'add', array('a' => $a, 'ap' => $ap, 'c' => $c, 'cp' => $cp));
         ob_end_clean();
     }
     $this->assertEqual($bv->getTemplate(), DIR_BASE_CORE . '/blocks/image/add.php', 'Test B');
 }
 public function testUpdate()
 {
     $db = Database::get();
     $this->assertTrue($db->tableExists('Files'));
     $sm = $db->getSchemaManager();
     $directory = dirname(__FILE__) . '/fixtures/';
     $configuration = new \Concrete\Core\Updater\Migrations\Configuration();
     $configuration->setMigrationsDirectory($directory);
     $configuration->registerMigrationsFromDirectory($directory);
     $migrations = $configuration->getMigrations();
     $originalLogs = $sm->listTableDetails('Logs');
     $this->assertEquals(2, count($migrations));
     $this->assertTrue(array_key_exists('20140908071333', $migrations));
     $this->assertInstanceOf('\\Doctrine\\DBAL\\Migrations\\Version', $migrations['20140908071333']);
     $migrations = $configuration->getMigrationsToExecute('up', '20140908095447');
     $this->assertEquals(2, count($migrations));
     $migrations = $configuration->getMigrationsToExecute('up', '20140908071333');
     $this->assertEquals(1, count($migrations));
     $migration = $migrations['20140908071333'];
     $migration->execute('up');
     $newLogs = $sm->listTableDetails('Logs');
     $fPassword = $sm->listTableDetails('Files')->getColumn('fPassword');
     $this->assertFalse($originalLogs->hasColumn('testcolumn'));
     $this->assertTrue($newLogs->hasColumn('testcolumn'));
     $this->assertInstanceof('\\Doctrine\\DBAL\\Types\\TextType', $fPassword->getType());
     $migration->execute('down');
     $fPassword = $sm->listTableDetails('Files')->getColumn('fPassword');
     $newLogs = $sm->listTableDetails('Logs');
     $this->assertInstanceof('\\Doctrine\\DBAL\\Types\\StringType', $fPassword->getType());
     $this->assertFalse($newLogs->hasColumn('testcolumn'));
     $migrations = $configuration->getMigrationsToExecute('up', '20140908095447');
     foreach ($migrations as $migration) {
         $migration->execute('up');
     }
     $this->assertTrue($db->tableExists('Widgets'));
     $bt = BlockType::getByHandle('file');
     $this->assertInstanceOf('\\Concrete\\Core\\Block\\BlockType\\BlockType', $bt);
     $this->assertEquals(2, $bt->getBlockTypeID());
     // because we cleared it out once already.
     $ids = $db->GetOne('select count(btID) from BlockTypes');
     $this->assertEquals(1, $ids);
 }
Beispiel #19
0
 private function add_personal_homepage($user_name, $nick_name, $doc_lang)
 {
     $page = Page::getByPath("/{$doc_lang}/engineer/{$user_name}");
     if ($page->getCollectionID() > 0) {
         $this->set('error', t('Existed username: %s!', $user_name));
         return false;
     }
     $page_type = CollectionType::getByHandle('personal_homepage');
     $parent_page = Page::getByPath("/{$doc_lang}/engineer");
     $page = $parent_page->add($page_type, array('cName' => $nick_name, 'cHandle' => $user_name));
     if ($page instanceof Page) {
         $block_type = BlockType::getByHandle("fse_public_profile");
         $area = new Area('Side Bar');
         $page->addBlock($block_type, $area, array("fseUsername" => $user_name));
     } else {
         $this->set('error', t('Failed to create personal homepage!'));
         return false;
     }
     return true;
 }
Beispiel #20
0
 public function run()
 {
     $bt = BlockType::getByHandle('guestbook');
     if (is_object($bt)) {
         $bt->refresh();
     }
     // add user export users task permission
     $pk = PermissionKey::getByHandle('access_user_search_export');
     if (!$pk instanceof PermissionKey) {
         $pk = PermissionKey::add('user', 'access_user_search_export', 'Export Site Users', 'Controls whether a user can export site users or not', false, false);
         $pa = $pk->getPermissionAccessObject();
         if (!is_object($pa)) {
             $pa = PermissionAccess::create($pk);
         }
         $adminGroup = Group::getByID(ADMIN_GROUP_ID);
         //Make sure "Adminstrators" group still exists
         if ($adminGroup) {
             $adminGroupEntity = GroupPermissionAccessEntity::getOrCreate($adminGroup);
             $pa->addListItem($adminGroupEntity);
             $pt = $pk->getPermissionAssignmentObject();
             $pt->assignPermissionAccess($pa);
         }
     }
     if (!Config::get('SECURITY_TOKEN_JOBS')) {
         Config::save('SECURITY_TOKEN_JOBS', Loader::helper('validation/identifier')->getString(64));
     }
     if (!Config::get('SECURITY_TOKEN_ENCRYPTION')) {
         Config::save('SECURITY_TOKEN_ENCRYPTION', Loader::helper('validation/identifier')->getString(64));
     }
     if (!Config::get('SECURITY_TOKEN_VALIDATION')) {
         Config::save('SECURITY_TOKEN_VALIDATION', Loader::helper('validation/identifier')->getString(64));
     }
     $sp = Page::getByPath('/dashboard/system/mail/method/test_settings');
     if (!is_object($sp) || $sp->isError()) {
         $sp = SinglePage::add('/dashboard/system/mail/method/test_settings');
         $sp->update(array('cName' => t('Test Mail Settings')));
         $sp->setAttribute('meta_keywords', 'test smtp, test mail');
     }
 }
 public function up(Schema $schema)
 {
     // image resizing options
     $sp = Page::getByPath('/dashboard/system/files/image_uploading');
     if (!is_object($sp) || $sp->isError()) {
         $sp = \Concrete\Core\Page\Single::add('/dashboard/system/files/image_uploading');
         $sp->update(array('cName' => 'Image Uploading'));
     }
     // background size/position
     \Concrete\Core\Database\Schema\Schema::refreshCoreXMLSchema(array('StyleCustomizerInlineStyleSets'));
     $bt = \BlockType::getByHandle('image_slider');
     if (is_object($bt)) {
         $bt->refresh();
     }
     $bt = \BlockType::getByHandle('youtube');
     if (is_object($bt)) {
         $bt->refresh();
     }
     $bt = \BlockType::getByHandle('autonav');
     if (is_object($bt)) {
         $bt->refresh();
     }
 }
Beispiel #22
0
 public function edit()
 {
     $b = $this->getBlockObject();
     $bCID = $b->getBlockCollectionID();
     $bID = $b->getBlockID();
     $this->set('bID', $bID);
     $c = Page::getCurrentPage();
     if ($c->getCollectionID() != $this->cParentID && !$this->cThis && $this->cParentID != 0) {
         $isOtherPage = true;
         $this->set('isOtherPage', true);
     }
     $uh = Loader::helper('concrete/urls');
     $this->set('uh', $uh);
     $this->set('bt', BlockType::getByHandle('easynews_list'));
 }
Beispiel #23
0
                     $b->alias($c);
                 }
             }
         }
     }
 } else {
     if (isset($_REQUEST['bID'])) {
         if ($_REQUEST['globalBlock']) {
             $scrapbookHelper = Loader::helper('concrete/scrapbook');
             $c1 = $scrapbookHelper->getGlobalScrapbookPage();
             $a1 = Area::get($c1, $_REQUEST['globalScrapbook']);
             $b = Block::getByID($_REQUEST['bID'], $c1, $a1);
         } else {
             $b = Block::getByID($_REQUEST['bID']);
         }
         $bt = BlockType::getByHandle($b->getBlockTypeHandle());
         if ($ap->canAddBlock($bt)) {
             $b->setBlockAreaObject($a);
             if (!$bt->includeAll()) {
                 $nvc = $c->getVersionToModify();
                 $b->alias($nvc);
             } else {
                 $b->alias($c);
             }
         }
     }
 }
 $obj = new stdClass();
 $obj->aID = $a->getAreaID();
 $obj->arHandle = $a->getAreaHandle();
 $obj->cID = $c->getCollectionID();
<?php

defined('C5_EXECUTE') or die("Access Denied.");
$u = new User();
$fp = FilePermissions::getGlobal();
if (!$fp->canAddFiles()) {
    die(t("Unable to add files."));
}
$f = File::getByID($_REQUEST['fID']);
if (is_object($f) && !$f->isError()) {
    $fID = $f->getFileID();
}
$bt = BlockType::getByHandle('image');
$url = Loader::helper('concrete/urls');
$save_url = $url->getBlockTypeToolsUrl($bt) . "/composer_save?bID=" . $_REQUEST['bID'] . "&fID=" . $fID;
?>
<object type="application/x-shockwave-flash" data="<?php 
echo ASSETS_URL_FLASH;
?>
/thumbnail_editor_3.swf" width="100%" height="500" id="ccm-image-composer-thumbnail-crop">
<param name="wmode" value="transparent">
<param name="quality" value="high">
<param name="flashvars" value="tint=0&amp;backgroundColor=#FFFFFF&amp;upload=true&amp;webcam=false&amp;width=<?php 
echo $_GET['width'];
?>
&amp;height=<?php 
echo $_GET['height'];
?>
&amp;image=<?php 
echo $f->getRelativePath();
?>
 if ($b->getBlockTypeHandle() == BLOCK_HANDLE_STACK_PROXY) {
     $class .= ' ccm-block-stack ';
 }
 $editInline = false;
 if ($btw->supportsInlineEdit()) {
     $editInline = true;
 }
 $btOriginal = $btw;
 $bID = $b->getBlockID();
 $aID = $a->getAreaID();
 $heightPlus = 20;
 $btHandle = $btw->getBlockTypeHandle();
 if ($btw->getBlockTypeHandle() == BLOCK_HANDLE_SCRAPBOOK_PROXY) {
     $_bi = $b->getInstance();
     $_bo = Block::getByID($_bi->getOriginalBlockID());
     $btOriginal = BlockType::getByHandle($_bo->getBlockTypeHandle());
     $btHandle = $btOriginal->getBlockTypeHandle();
     $heightPlus = 80;
     if ($btOriginal->supportsInlineEdit()) {
         $editInline = true;
     }
 }
 $canDesign = $p->canEditBlockDesign() && Config::get('concrete.design.enable_custom') == true;
 $canModifyGroups = $p->canEditBlockPermissions() && Config::get('concrete.permissions.model') != 'simple' && !$a->isGlobalArea();
 $canEditName = $p->canEditBlockName();
 $canEditCacheSettings = $p->canEditBlockCacheSettings();
 $canEditCustomTemplate = $p->canEditBlockCustomTemplate();
 $canScheduleGuestAccess = Config::get('concrete.permissions.model') != 'simple' && $p->canGuestsViewThisBlock() && $p->canScheduleGuestAccess() && !$a->isGlobalArea();
 $canAliasBlockOut = $c->isMasterCollection() && !$a->isGlobalArea();
 if ($canAliasBlockOut) {
     $ct = PageType::getByID($c->getPageTypeID());
defined('C5_EXECUTE') or die("Access Denied.");
$co = Request::get();
$include = false;
if ($co->isIncludeRequest()) {
    $env = Environment::get();
    switch ($co->getIncludeType()) {
        case "CONCRETE_TOOL":
        case "TOOL":
            $r = $env->getPath(DIRNAME_TOOLS . '/' . $co->getFilename());
            break;
        case 'PACKAGE_TOOL':
            $r = $env->getPath(DIRNAME_TOOLS . '/' . $co->getFilename(), $co->getPackageHandle());
            break;
        case "BLOCK_TOOL":
            if ($co->getBlock() != '') {
                $bt = BlockType::getByHandle($co->getBlock());
                if ($bt->getPackageID() > 0) {
                    $r = $env->getPath(DIRNAME_BLOCKS . '/' . $bt->getBlockTypeHandle() . '/' . DIRNAME_BLOCK_TOOLS . '/' . $co->getFilename(), $bt->getPackageHandle());
                } else {
                    $r = $env->getPath(DIRNAME_BLOCKS . '/' . $bt->getBlockTypeHandle() . '/' . DIRNAME_BLOCK_TOOLS . '/' . $co->getFilename());
                }
            }
            break;
    }
    if (file_exists($r)) {
        include $r;
    }
    require DIR_BASE_CORE . '/startup/shutdown.php';
    exit;
}
<li><a href='#' data-menu-action="area-add-block"><?php 
    echo t('Add Block');
    ?>
</a></li><?php 
}
if ($showAreaDesign || $showAreaLayouts) {
    if ($showAreaDesign) {
        ?>
<li><a data-menu-action="edit-area-design" href="#"><?php 
        echo t("Edit Area Design");
        ?>
</a></li><?php 
    }
    if ($showAreaLayouts) {
        $areabt = BlockType::getByHandle(BLOCK_HANDLE_LAYOUT_PROXY);
        $areaLayoutBT = BlockType::getByHandle('core_area_layout');
        ?>
<li><a dialog-title="<?php 
        echo t('Add Layout');
        ?>
" data-block-type-handle="<?php 
        echo $areabt->getBlockTypeHandle();
        ?>
" data-area-grid-maximum-columns="<?php 
        echo $a->getAreaGridMaximumColumns();
        ?>
" data-menu-action="add-inline" href="#" data-block-type-id="<?php 
        echo $areabt->getBlockTypeID();
        ?>
"><?php 
        echo t("Add Layout");
Beispiel #28
0
 protected function importAdditionalData($b, $blockNode)
 {
     $controller = $b->getController();
     $arLayout = $controller->getAreaLayoutObject();
     $columns = $arLayout->getAreaLayoutColumns();
     $layoutArea = $b->getBlockAreaObject();
     $arLayout->setAreaObject($b->getBlockAreaObject());
     $page = $b->getBlockCollectionObject();
     $i = 0;
     foreach ($blockNode->arealayout->columns->column as $columnNode) {
         $column = $columns[$i];
         $as = new SubArea($column->getAreaLayoutColumnDisplayID(), $layoutArea->getAreaHandle(), $layoutArea->getAreaID());
         $as->load($page);
         $column->setAreaID($as->getAreaID());
         $area = $column->getAreaObject();
         foreach ($columnNode->block as $bx) {
             $bt = \BlockType::getByHandle($bx['type']);
             if (!is_object($bt)) {
                 throw new \Exception(t('Invalid block type handle: %s', strval($bx['type'])));
             }
             $btc = $bt->getController();
             $btc->import($page, $area->getAreaHandle(), $bx);
         }
         $i++;
     }
 }
Beispiel #29
0
 private function getPkgHandle()
 {
     return BlockType::getByHandle($this->btHandle)->getPackageHandle();
 }
Beispiel #30
0
 public function run()
 {
     if (!Config::get('SITE_INSTALLED_APP_VERSION')) {
         Config::save('SITE_INSTALLED_APP_VERSION', Config::get('SITE_APP_VERSION'));
     }
     BlockTypeList::resetBlockTypeDisplayOrder();
     $th = PageTheme::getByHandle('greek_yogurt');
     if (!is_object($th)) {
         PageTheme::add('greek_yogurt');
     }
     $bt = BlockType::getByHandle('core_scrapbook_display');
     if (is_object($bt)) {
         $bt->refresh();
     }
     $bt = BlockType::getByHandle('search');
     if (is_object($bt)) {
         $bt->refresh();
     }
     $sp = Page::getByPath('/dashboard/users/group_sets');
     if ($sp->isError()) {
         $d11 = SinglePage::add('/dashboard/users/group_sets');
         $d11->update(array('cName' => t('Group Sets')));
     }
     $sp = Page::getByPath('/dashboard/system/seo/bulk_seo_tool');
     if ($sp->isError()) {
         $d1a = SinglePage::add('/dashboard/system/seo/bulk_seo_tool');
         $d1a->update(array('cName' => t('Bulk SEO Updater')));
     }
     $sp = Page::getByPath('/dashboard/system/permissions/users');
     if ($sp->isError()) {
         $d1a = SinglePage::add('/dashboard/system/permissions/users');
         $d1a->update(array('cName' => t('User Permissions')));
     }
     $sp = Page::getByPath('/dashboard/blocks/permissions');
     if ($sp->isError()) {
         $d1a = SinglePage::add('/dashboard/blocks/permissions');
         $d1a->update(array('cName' => t('Block &amp; Stack Permissions')));
     }
     $sp = Page::getByPath('/dashboard/system/permissions/advanced');
     if ($sp->isError()) {
         $d1b = SinglePage::add('/dashboard/system/permissions/advanced');
         $d1b->update(array('cName' => t('Advanced Permissions')));
     }
     $sp = Page::getByPath('/dashboard/workflow');
     if ($sp->isError()) {
         $d1a = SinglePage::add('/dashboard/workflow');
         $d1a->update(array('cName' => t('Workflow')));
     }
     $sp = Page::getByPath('/dashboard/workflow/list');
     if ($sp->isError()) {
         $d1a = SinglePage::add('/dashboard/workflow/list');
     }
     $sp = Page::getByPath('/dashboard/workflow/me');
     if ($sp->isError()) {
         $d1a = SinglePage::add('/dashboard/workflow/me');
         $d1a->update(array('cName' => t('Waiting for Me')));
     }
     $sp = Page::getByPath('/dashboard/system/environment/proxy');
     if ($sp->isError()) {
         $d1a = SinglePage::add('/dashboard/system/environment/proxy');
         $d1a->update(array('cName' => t('Proxy Server')));
     }
     // update meta keywords
     $pageKeywords = array('/dashboard/composer' => t('blog, blogging'), '/dashboard/composer/write' => t('new blog, write blog, blogging'), '/dashboard/composer/drafts' => t('blog drafts, composer'), '/dashboard/sitemap' => t('pages, add page, delete page, copy, move, alias'), '/dashboard/sitemap/full' => t('pages, add page, delete page, copy, move, alias'), '/dashboard/sitemap/explore' => t('pages, add page, delete page, copy, move, alias, bulk'), '/dashboard/sitemap/search' => t('find page, search page, search, find, pages, sitemap'), '/dashboard/files/search' => t('add file, delete file, copy, move, alias, resize, crop, rename, images, title, attribute'), '/dashboard/files/attributes' => t('file, file attributes, title, attribute, description, rename'), '/dashboard/files/sets' => t('files, category, categories'), '/dashboard/files/add_set' => t('new file set'), '/dashboard/users' => t('users, groups, people, find, delete user, remove user, change password, password'), '/dashboard/users/search' => t('find, search, people, delete user, remove user, change password, password'), '/dashboard/users/groups' => t('user, group, people, permissions, access, expire'), '/dashboard/users/attributes' => t('user attributes, user data, gather data, registration data'), '/dashboard/users/add' => t('new user, create'), '/dashboard/users/add_group' => t('new user group, new group, group, create'), '/dashboard/users/group_sets' => t('group set'), '/dashboard/reports' => t('forms, log, error, email, mysql, exception, survey'), '/dashboard/reports/statistics' => t('hits, pageviews, visitors, activity'), '/dashboard/reports/forms' => t('forms, questions, response, data'), '/dashboard/reports/surveys' => t('questions, quiz, response'), '/dashboard/reports/logs' => t('forms, log, error, email, mysql, exception, survey, history'), '/dashboard/pages/themes' => t('new theme, theme, active theme, change theme, template, css'), '/dashboard/pages/themes/add' => t('theme'), '/dashboard/pages/themes/inspect' => t('page types'), '/dashboard/pages/themes/customize' => t('custom theme, change theme, custom css, css'), '/dashboard/pages/types' => t('page type defaults, global block, global area, starter, template'), '/dashboard/pages/attributes' => t('page attributes, custom'), '/dashboard/pages/single' => t('single, page, custom, application'), '/dashboard/workflow' => t('add workflow, remove workflow'), '/dashboard/blocks/stacks' => t('stacks, reusable content, scrapbook, copy, paste, paste block, copy block, site name, logo'), '/dashboard/blocks/stacks/list' => t('edit stacks, view stacks, all stacks'), '/dashboard/blocks/types' => t('block, refresh, custom'), '/dashboard/extend' => t('add-on, addon, add on, package, applications, ecommerce, discussions, forums, themes, templates, blocks'), '/dashboard/extend/install' => t('add-on, addon, ecommerce, install, discussions, forums, themes, templates, blocks'), '/dashboard/extend/update' => t('update, upgrade'), '/dashboard/extend/connect' => t('concrete5.org, my account, marketplace'), '/dashboard/extend/themes' => t('buy theme, new theme, marketplace, template'), '/dashboard/extend/add-ons' => t('buy addon, buy add on, buy add-on, purchase addon, purchase add on, purchase add-on, find addon, new addon, marketplace'), '/dashboard/system' => t('dashboard, configuration'), '/dashboard/system/basics/site_name' => t('website name, title'), '/dashboard/system/basics/icons' => t('logo, favicon, iphone, icon, bookmark'), '/dashboard/system/basics/editor' => t('tinymce, content block, fonts, editor, content, overlay'), '/dashboard/system/basics/multilingual' => t('translate, translation, internationalization, multilingual'), '/dashboard/system/basics/timezone' => t('timezone, profile, locale'), '/dashboard/system/basics/interface' => t('interface, quick nav, dashboard background, background image'), '/dashboard/system/seo/urls' => t('vanity, pretty url, seo, pageview, view'), '/dashboard/system/seo/bulk_seo_tool' => t('bulk, seo, change keywords, engine, optimization, search'), '/dashboard/system/seo/tracking_codes' => t('traffic, statistics, google analytics, quant, pageviews, hits'), '/dashboard/system/seo/statistics' => t('turn off statistics, tracking, statistics, pageviews, hits'), '/dashboard/system/seo/search_index' => t('configure search, site search, search option'), '/dashboard/system/optimization/cache' => t('cache option, change cache, override, turn on cache, turn off cache, no cache, page cache, caching'), '/dashboard/system/optimization/clear_cache' => t('cache option, turn off cache, no cache, page cache, caching'), '/dashboard/system/optimization/jobs' => t('index search, reindex search, build sitemap, sitemap.xml, clear old versions, page versions, remove old'), '/dashboard/system/permissions/site' => t('editors, hide site, offline, private, public, access'), '/dashboard/system/permissions/files' => t('file options, file manager, upload, modify'), '/dashboard/system/permissions/file_types' => t('security, files, media, extension, manager, upload'), '/dashboard/system/permissions/tasks' => t('security, actions, administrator, admin, package, marketplace, search'), '/dashboard/system/permissions/ip_blacklist' => t('security, lock ip, lock out, block ip, address, restrict, access'), '/dashboard/system/permissions/captcha' => t('security, registration'), '/dashboard/system/permissions/antispam' => t('antispam, block spam, security'), '/dashboard/system/permissions/maintenance_mode' => t('lock site, under construction, hide, hidden'), '/dashboard/system/registration/postlogin' => t('profile, login, redirect, specific, dashboard, administrators'), '/dashboard/system/registration/profiles' => t('member profile, member page, community, forums, social, avatar'), '/dashboard/system/registration/public_registration' => t('signup, new user, community'), '/dashboard/system/mail' => t('smtp, mail settings'), '/dashboard/system/mail/method' => t('email server, mail settings, mail configuration, external, internal'), '/dashboard/system/mail/importers' => t('email server, mail settings, mail configuration, private message, message system, import, email, message'), '/dashboard/system/attributes' => t('attribute configuration'), '/dashboard/system/attributes/sets' => t('attributes, sets'), '/dashboard/system/attributes/types' => t('attributes, types'), '/dashboard/system/environment/info' => t('overrides, system info, debug, support, help'), '/dashboard/system/environment/debug' => t('errors, exceptions, develop, support, help'), '/dashboard/system/environment/logging' => t('email, logging, logs, smtp, pop, errors, mysql, log'), '/dashboard/system/environment/file_storage_locations' => t('security, alternate storage, hide files'), '/dashboard/system/environment/proxy' => t('network, proxy server'), '/dashboard/system/backup_restore' => t('export, backup, database, sql, mysql, encryption, restore'), '/dashboard/system/backup_restore/update' => t('upgrade, new version, update'), '/dashboard/system/backup_restore/database' => t('export, database, xml, starting, points, schema, refresh, custom, tables'), '/dashboard/system/seo/search_index' => t('configure search, site search, search option'), '/dashboard/system/optimization/cache' => t('cache option, change cache, override, turn on cache, turn off cache, no cache, page cache, caching'));
     foreach ($pageKeywords as $page => $keywords) {
         $p = Page::getByPath($page, 'ACTIVE');
         $ak = CollectionAttributeKey::getByHandle('meta_keywords');
         if (is_object($p) && !$p->isError() && $ak instanceof AttributeKey) {
             $p->setAttribute('meta_keywords', $keywords);
         }
     }
     // install the permissions from permissions.xml
     $this->installPermissionsAndWorkflow();
     $this->addGlobalBlockPermissions();
     $this->migratePagePermissions();
     $this->migratePagePermissionPageTypes();
     $this->migrateAreaPermissions();
     $this->migrateAreaPermissionBlockTypes();
     $this->migrateBlockPermissions();
     $this->migrateFileSetPermissions();
     $this->migrateAddFilePermissions();
     $this->migrateFilePermissions();
     $this->migrateTaskPermissions();
     $this->migrateThemes();
     $this->migratePageTypes();
     $this->setupDashboardIcons();
 }