public function save() { if (Loader::helper('validation/token')->validate('save_permissions')) { $fs = FileSet::getGlobal(); $tp = new TaskPermission(); if ($tp->canAccessTaskPermissions()) { $permissions = PermissionKey::getList('file_set'); foreach ($permissions as $pk) { $pk->setPermissionObject($fs); $paID = $_POST['pkID'][$pk->getPermissionKeyID()]; $pt = $pk->getPermissionAssignmentObject(); $pt->clearPermissionAssignment(); if ($paID > 0) { $pa = PermissionAccess::getByID($paID, $pk); if (is_object($pa)) { $pt->assignPermissionAccess($pa); } } } $this->redirect('/dashboard/system/permissions/files', 'updated'); } } else { $this->error->add(Loader::helper("validation/token")->getErrorMessage()); } }
public function restore_backup() { $tp = new TaskPermission(); if (!$tp->canBackup()) { return false; } $file = $this->post('backup_file'); $db = Loader::db(); chmod(DIR_FILES_BACKUPS . '/' . $file, 0666); $str_restSql = file_get_contents(DIR_FILES_BACKUPS . '/' . $file); if (!$str_restSql) { $this->set("error", array("There was an error trying to restore the database. This file was empty.")); $this->view(); return false; } $crypt = Loader::helper('encryption'); if (!preg_match('/INSERT/m', $str_restSql) && !preg_match('/CREATE/m', $str_restSql)) { $str_restSql = $crypt->decrypt($str_restSql); } $arr_sqlStmts = explode("\n\n", $str_restSql); foreach ($arr_sqlStmts as $str_stmt) { if (trim($str_stmt) != "") { $res_restoration = $db->execute($str_stmt); if (!$res_restoration) { $this->set("error", array("There was an error trying to restore the database. In query {$str_stmt}")); return; } } } $this->set("message", "Restoration Sucessful"); //reset perms for security! chmod(DIR_FILES_BACKUPS . '/' . $file, 00); Cache::flush(); $this->view(); }
public function prepare_remote_upgrade($remoteMPID = 0){ $tp = new TaskPermission(); if ($tp->canInstallPackages()) { Loader::model('marketplace_remote_item'); $mri = MarketplaceRemoteItem::getByID($remoteMPID); if (!is_object($mri)) { $this->set('error', array(t('Invalid marketplace item ID.'))); return; } $local = Package::getbyHandle($mri->getHandle()); if (!is_object($local) || $local->isPackageInstalled() == false) { $this->set('error', array(Package::E_PACKAGE_NOT_FOUND)); return; } $r = $mri->downloadUpdate(); if ($r != false) { if (!is_array($r)) { $this->set('error', array($r)); } else { $errors = Package::mapError($r); $this->set('error', $errors); } } else { $this->redirect('/dashboard/extend/update', 'do_update', $mri->getHandle()); } } }
public function save() { if (Loader::helper('validation/token')->validate('save_permissions')) { $tp = new TaskPermission(); if ($tp->canAccessTaskPermissions()) { $permissions = PermissionKey::getList('sitemap'); $permissions = array_merge($permissions, PermissionKey::getList('marketplace_newsflow')); $permissions = array_merge($permissions, PermissionKey::getList('admin')); foreach ($permissions as $pk) { $paID = $_POST['pkID'][$pk->getPermissionKeyID()]; $pt = $pk->getPermissionAssignmentObject(); $pt->clearPermissionAssignment(); if ($paID > 0) { $pa = PermissionAccess::getByID($paID, $pk); if (is_object($pa)) { $pt->assignPermissionAccess($pa); } } } $this->redirect('/dashboard/system/permissions/tasks', 'updated'); } } else { $this->error->add(Loader::helper("validation/token")->getErrorMessage()); } }
public function view() { $this->set('latest_version', Config::get('APP_VERSION_LATEST')); $tp = new TaskPermission(); $updates = 0; $local = array(); $remote = array(); if ($tp->canInstallPackages()) { $local = Package::getLocalUpgradeablePackages(); $remote = Package::getRemotelyUpgradeablePackages(); } // now we strip out any dupes for the total $updates = 0; $localHandles = array(); foreach ($local as $_pkg) { $updates++; $localHandles[] = $_pkg->getPackageHandle(); } foreach ($remote as $_pkg) { if (!in_array($_pkg->getPackageHandle(), $localHandles)) { $updates++; } } $this->set('updates', $updates); }
public function view() { $this->set('latest_version', \Concrete\Core\Updater\Update::getLatestAvailableVersionNumber()); $tp = new \TaskPermission(); $updates = 0; $local = array(); $remote = array(); if ($tp->canInstallPackages()) { $local = Package::getLocalUpgradeablePackages(); $remote = Package::getRemotelyUpgradeablePackages(); } // now we strip out any dupes for the total $updates = 0; $localHandles = array(); foreach ($local as $_pkg) { $updates++; $localHandles[] = $_pkg->getPackageHandle(); } foreach ($remote as $_pkg) { if (!in_array($_pkg->getPackageHandle(), $localHandles)) { $updates++; } } $this->set('updates', $updates); }
public function connect_complete() { $tp = new TaskPermission(); if ($tp->canInstallPackages()) { if (!$_POST['csToken']) { $this->set('error', array(t('An unexpected error occurred when connecting your site to the marketplace.'))); } else { Config::save('MARKETPLACE_SITE_TOKEN', $_POST['csToken']); Config::save('MARKETPLACE_SITE_URL_TOKEN', $_POST['csURLToken']); print '<script type="text/javascript">parent.window.location.href=\'' . View::url('/dashboard/install', 'view', 'community_connect_success') . '\';</script>'; exit; } } else { $this->set('error', array(t('You do not have permission to connect this site to the marketplace.'))); } }
public function save($post) { // clear all selected permissions $tps = array(); foreach ($post['tpID'] as $tpID) { $tp = TaskPermission::getByID($tpID); $tps[] = $tp; $tp->clearPermissions(); } foreach ($post['selectedEntity'] as $e) { if ($e != '') { $o1 = explode('_', $e); if ($o1[0] == 'uID') { $obj = UserInfo::getByID($o1[1]); } else { $obj = Group::getByID($o1[1]); } foreach ($tps as $tp) { if ($post[$e . '_' . $tp->getTaskPermissionID()] == 1) { $tp->addAccess($obj); } } } } }
public function run() { $db = Loader::db(); $cnt = $db->GetOne('select count(*) from TaskPermissions where tpHandle = ?', array('delete_user')); if ($cnt < 1) { $g3 = Group::getByID(ADMIN_GROUP_ID); $tip = TaskPermission::addTask('delete_user', t('Delete Users'), false); if (is_object($g3)) { $tip->addAccess($g3); } } Loader::model('single_page'); $sp = Page::getByPath('/dashboard/settings/multilingual'); if ($sp->isError()) { $d1a = SinglePage::add('/dashboard/settings/multilingual'); $d1a->update(array('cName' => t('Multilingual Setup'))); } $sp = Page::getByPath('/dashboard/composer'); if ($sp->isError()) { $d2 = SinglePage::add('/dashboard/composer'); $d2->update(array('cName' => t('Composer Beta'), 'cDescription' => t('Write for your site.'))); } $sp = Page::getByPath('/dashboard/composer/write'); if ($sp->isError()) { $d3 = SinglePage::add('/dashboard/composer/write'); } $sp = Page::getByPath('/dashboard/composer/drafts'); if ($sp->isError()) { $d4 = SinglePage::add('/dashboard/composer/drafts'); } $sp = Page::getByPath('/dashboard/pages/types/composer'); if ($sp->isError()) { $d5 = SinglePage::add('/dashboard/pages/types/composer'); } }
public function save_task_permissions() { if (!$this->token->validate("update_permissions")) { $this->set('error', array($this->token->getErrorMessage())); return; } $tp = new TaskPermission(); if (!$tp->canAccessTaskPermissions()) { $this->set('error', array(t('You do not have permission to modify these items.'))); return; } $post = $this->post(); $h = Loader::helper('concrete/dashboard/task_permissions'); $h->save($post); $this->redirect('/dashboard/settings/', 'set_permissions', 'task_permissions_saved'); }
public function run() { $db = Loader::db(); $columns = $db->MetaColumns('Pages'); if (!isset($columns['CISSYSTEMPAGE'])) { $db->Execute('alter table Pages add column cIsSystemPage tinyint(1) not null default 0'); $db->Execute('alter table Pages add index (cIsSystemPage)'); } $columns = $db->MetaColumns('Pages'); if (!isset($columns['CISACTIVE'])) { $db->Execute('alter table Pages add column cIsActive tinyint(1) not null default 1'); $db->Execute('alter table Pages add index (cIsActive)'); $db->Execute('update Pages set cIsActive = 1'); } $columns = $db->MetaColumns('PageSearchIndex'); if (!isset($columns['CREQUIRESREINDEX'])) { $db->Execute('alter table PageSearchIndex add column cRequiresReindex tinyint(1) not null default 0'); $db->Execute('alter table PageSearchIndex add index (cRequiresReindex)'); } // install version job Loader::model("job"); Job::installByHandle('remove_old_page_versions'); // flag system pages appropriately Page::rescanSystemPages(); // add a newsflow task permission $db = Loader::db(); $cnt = $db->GetOne('select count(*) from TaskPermissions where tpHandle = ?', array('view_newsflow')); if ($cnt < 1) { $g3 = Group::getByID(ADMIN_GROUP_ID); $tip = TaskPermission::addTask('view_newsflow', t('View Newsflow'), false); if (is_object($g3)) { $tip->addAccess($g3); } } // Install new block types $this->installBlockTypes(); // install stacks, trash and drafts $this->installSinglePages(); // move the old dashboard $newDashPage = Page::getByPath('/dashboard/welcome'); if (!is_object($newDashPage) || $newDashPage->isError()) { $dashboard = Page::getByPath('/dashboard'); $dashboard->moveToTrash(); // install new dashboard + page types $this->installDashboard(); $this->migrateOldDashboard(); } Loader::model('system/captcha/library'); $scl = SystemCaptchaLibrary::getByHandle('securimage'); if (!is_object($scl)) { $scl = SystemCaptchaLibrary::add('securimage', t('SecurImage (Default)')); $scl->activate(); } Config::save('SEEN_INTRODUCTION', 1); }
public function install($btHandle = null) { $tp = new TaskPermission(); if ($tp->canInstallPackages()) { try { $resp = BlockType::installBlockType($btHandle); if ($resp != '') { $this->error->add($resp); } else { $this->set('message', t('Block Type Installed.')); } } catch(Exception $e) { $this->error->add($e); $this->set('error', $this->error); } } else { $this->error->add(t('You do not have permission to install custom block types or add-ons.')); $this->set('error', $this->error); } $this->view(); }
public function testForErrors() { if ($this->object->isMasterCollection()) { $canEditMaster = TaskPermission::getByHandle('access_page_defaults')->can(); if (!($canEditMaster && $_SESSION['mcEditID'] == $this->object->getCollectionID())) { return COLLECTION_FORBIDDEN; } } else { if ((!$this->canViewPage()) && (!$this->object->getCollectionPointerExternalLink() != '')) { return COLLECTION_FORBIDDEN; } } }
public function view() { $tp = new TaskPermission(); if ($tp->canBackup()) { $fh = Loader::helper('file'); $arr_bckups = @$fh->getDirectoryContents(DIR_FILES_BACKUPS); $arr_backupfileinfo = array(); if (count($arr_bckups) > 0) { foreach ($arr_bckups as $bkupfile) { // This will ignore files that do not match the created backup pattern of including a timestamp in the filename if (preg_match("/_([\\d]{10,})/", $bkupfile, $timestamp)) { $arr_backupfileinfo[] = array("file" => $bkupfile, "date" => date("Y-m-d H:i:s", $timestamp[1])); } } // The whole reason this file's overriden - sort these backups chronologically uasort($arr_backupfileinfo, function ($a, $b) { return strcmp($b['date'], $a['date']); }); $this->set('backups', $arr_backupfileinfo); } } }
public function run() { $db = Loader::db(); $cnt = $db->GetOne('select count(*) from TaskPermissions where tpHandle = ?', array('install_packages')); if ($cnt < 1) { $g3 = Group::getByID(ADMIN_GROUP_ID); $tip = TaskPermission::addTask('install_packages', t('Install Packages and Connect to the Marketplace'), false); if (is_object($g3)) { $tip->addAccess($g3); } } // ensure we have a proper ocID $db->Execute("alter table Files modify column ocID int unsigned not null default 0"); }
public function sign_in_as_user($uID, $token = null) { try { $u = new User(); $tp = new TaskPermission(); if (!$tp->canSudo()) { throw new Exception(t('You do not have permission to perform this action.')); } $ui = UserInfo::getByID($uID); if (!$ui instanceof UserInfo) { throw new Exception(t('Invalid user ID.')); } $valt = Loader::helper('validation/token'); if (!$valt->validate('sudo', $token)) { throw new Exception($valt->getErrorMessage()); } User::loginByUserID($uID); $this->redirect('/'); } catch (Exception $e) { $this->set('error', $e); $this->view(); } }
function canRead() { $tp = new TaskPermission(); return $tp->canAccessSitemap(); }
ob_end_clean(); ?> <?php $fs = FileSet::getGlobal(); ?> <form method="post" action="<?php echo $view->action('save'); ?> " id="ccm-permission-list-form"> <?php echo Loader::helper('validation/token')->output('save_permissions'); ?> <div class="ccm-pane-body"> <?php $tp = new TaskPermission(); if ($tp->canAccessTaskPermissions()) { ?> <?php Loader::element('permission/lists/file_set', array('fs' => $fs)); ?> <?php } else { ?> <p><?php echo t('You cannot access task permissions.'); ?> </p> <?php }
<?php defined('C5_EXECUTE') or die("Access Denied."); $ch = Loader::helper('concrete/interface'); $tp = new TaskPermission(); //marketplace if (ENABLE_MARKETPLACE_SUPPORT) { Loader::model('marketplace_remote_item'); $mri = new MarketplaceRemoteItemList(); $mri->filterByIsFeaturedRemotely(1); $mri->setType('themes'); $mri->execute(); $availableThemes = $mri->getPage(); } else { $availableThemes = array(); } ?> <script type="text/javascript"> ccm_marketplaceRefreshInstalledThemes = function() { jQuery.fn.dialog.closeTop(); $("a#ccm-nav-design").click(); } </script> <h2><?php echo t('Themes'); ?> </h2> <?php if (!$tp->canInstallPackages()) {
<?php defined('C5_EXECUTE') or die("Access Denied."); $tp = new TaskPermission(); if (!$tp->canAccessUserSearch()) { die(t("You have no access to users.")); } $u = new User(); $cnt = Loader::controller('/dashboard/users/search'); $userList = $cnt->getRequestedSearchResults(); $columns = $cnt->get('columns'); $users = $userList->getPage(); $pagination = $userList->getPagination(); $searchType = Loader::helper('text')->entities($_REQUEST['searchType']); Loader::element('users/search_results', array('columns' => $columns, 'users' => $users, 'userList' => $userList, 'searchType' => $searchType, 'pagination' => $pagination));
<?php defined('C5_EXECUTE') or die("Access Denied."); $fp = FilePermissions::getGlobal(); $tp = new TaskPermission(); ?> <script> var CCM_EDITOR_SECURITY_TOKEN = "<?php echo Loader::helper('validation/token')->generate('editor'); ?> "; $(document).ready(function(){ var ccmReceivingEntry = ''; var sliderEntriesContainer = $('.ccm-image-slider-entries'); var _templateSlide = _.template($('#imageTemplate').html()); var attachDelete = function($obj) { $obj.click(function(){ var deleteIt = confirm('<?php echo t('Are you sure?'); ?> '); if(deleteIt == true) { $(this).closest('.ccm-image-slider-entry').remove(); doSortCount(); } }); } var attachSortDesc = function($obj) { $obj.click(function(){ var myContainer = $(this).closest($('.ccm-image-slider-entry'));
if ($ct->getPackageID() > 0) { $package = Package::getByID($ct->getPackageID()); } if (is_object($package)) { print $package->getPackageName(); } else { print t('None'); } ?> </td> <td> <?php if ($ct->getMasterCollectionID()) { ?> <?php $tp = new TaskPermission(); if ($tp->canAccessPageDefaults()) { ?> <?php print $ih->button(t('Defaults'), $this->url('/dashboard/pages/types?cID=' . $ct->getMasterCollectionID() . '&task=load_master'), 'left', 'small'); ?> <?php } else { $defaultsErrMsg = t('You do not have access to page type default content.'); ?> <?php print $ih->button_js(t('Defaults'), "alert('" . $defaultsErrMsg . "')", 'left', 'small ccm-button-inactive', array('title' => t('Lets you set default permissions and blocks for a particular page type.'))); ?> <?php } ?>
?> <div id="ccm-list-none"><?php echo t('No users found.'); ?> </div> <?php } ?> </div> <?php $tp = new TaskPermission(); if ($tp->canAccessUserSearchExport()) { ?> <div id="ccm-export-results-wrapper"> <a id="ccm-export-results" href="javascript:void(0)" onclick="$('#ccm-user-advanced-search').attr('action', '<?php echo REL_DIR_FILES_TOOLS_REQUIRED; ?> /users/search_results_export'); $('#ccm-user-advanced-search').get(0).submit(); $('#ccm-user-advanced-search').attr('action', '<?php echo REL_DIR_FILES_TOOLS_REQUIRED; ?> /users/search_results');"><span></span><?php echo t('Export'); ?> </a> </div> <?php
<? defined('C5_EXECUTE') or die("Access Denied."); $tp = new TaskPermission(); if (!$tp->canAccessGroupSearch()) { echo(t("You have no access to groups.")); } else { if (!$_REQUEST['group_submit_search']) { ?> <div id="ccm-group-search-wrapper"> <? } ?> <? Loader::model('search/group'); $gl = new GroupSearch(); if ($_REQUEST['include_core_groups'] == 1) { $gl->includeAllGroups(); } if (isset($_GET['gKeywords'])) { $gl->filterByKeywords($_GET['gKeywords']); } $gl->updateItemsPerPage(8); $gResults = $gl->getPage(); ?> <?php $group_search_form = '
public function getMarketplacePurchaseFrame($mp, $width = '100%', $height = '530') { $tp = new TaskPermission(); if ($tp->canInstallPackages()) { if (!is_object($mp)) { return '<div class="alert-message block-message error">' . t('Unable to get information about this product.') . '</div>'; } if ($this->isConnected()) { $url = MARKETPLACE_URL_CHECKOUT; $csiURL = urlencode(BASE_URL . DIR_REL); $csiBaseURL = urlencode(BASE_URL); $csToken = $this->getSiteToken(); $url = $url . '/' . intval($mp->getProductBlockID(), 10) . '?ts=' . time() . '&csiBaseURL=' . $csiBaseURL . '&csiURL=' . $csiURL . '&csToken=' . $csToken; } $time = time(); $ifr = '<script type="text/javascript">$(function() { $.receiveMessage(function(e) { jQuery.fn.dialog.hideLoader(); if (e.data == "loading") { jQuery.fn.dialog.showLoader(); } else { var eh = e.data; eh = parseInt(eh) + 20; $("#ccm-marketplace-frame-' . $time . '").attr("height", eh); } }, \'' . CONCRETE5_ORG_URL_SECURE . '\'); }); </script>'; $ifr .= '<iframe class="ccm-marketplace-frame" id="ccm-marketplace-frame-' . $time . '" class="ccm-marketplace-frame" frameborder="0" width="' . $width . '" height="' . $height . '" src="' . $url . '"></iframe>'; return $ifr; } else { return '<div class="ccm-error">' . t('You do not have permission to connect this site to the marketplace.') . '</div>'; } }
<?php defined('C5_EXECUTE') or die("Access Denied."); $tp = new TaskPermission(); if ($tp->canViewNewsflow()) { Loader::library('newsflow'); if (Loader::helper('validation/numbers')->integer($_REQUEST['cID'])) { $ed = Newsflow::getEditionByID($_REQUEST['cID']); if (is_object($ed)) { print $ed->getContent(); } } else { if (isset($_REQUEST['cPath'])) { $ed = Newsflow::getEditionByPath($_REQUEST['cPath']); if (is_object($ed)) { print $ed->getContent(); } } } }
/** * @return bool */ public function showNewsflowOverlay() { $tp = new \TaskPermission(); $c = Page::getCurrentPage(); if (Config::get('concrete.external.news_overlay') && $tp->canViewNewsflow() && $c->getCollectionPath() != '/dashboard/news') { $u = new ConcreteUser(); $nf = $u->config('NEWSFLOW_LAST_VIEWED'); if ($nf == 'FIRSTRUN') { return false; } if (Config::get('concrete.maintenance_mode') && !PermissionKey::getByHandle('view_in_maintenance_mode')->validate()) { return false; } if (!$nf) { return true; } if (time() - $nf > NEWSFLOW_VIEWED_THRESHOLD) { return true; } } return false; }
<?php defined('C5_EXECUTE') or die("Access Denied."); $valt = Loader::helper('validation/token'); $ci = Loader::helper('concrete/urls'); $ch = Loader::helper('concrete/ui'); $tp = new TaskPermission(); if ($tp->canInstallPackages()) { $mi = Marketplace::getInstance(); } $pkgRemote = array(); $pkgLocal = array(); if (Config::get('concrete.marketplace.enabled') && is_object($mi)) { if ($mi->isConnected()) { $pkgArray = Package::getInstalledList(); foreach ($pkgArray as $pkg) { if ($pkg->isPackageInstalled() && version_compare($pkg->getPackageVersion(), $pkg->getPackageVersionUpdateAvailable(), '<')) { $pkgRemote[] = $pkg; } } } } $pkgAvailableArray = Package::getLocalUpgradeablePackages(); foreach ($pkgAvailableArray as $pkg) { if (!in_array($pkg, $pkgRemote)) { $pkgLocal[] = $pkg; } } ?> <?php echo Loader::helper('concrete/dashboard')->getDashboardPaneHeaderWrapper(t('Update Add-Ons'));
<script type="text/javascript"> $(document).ready( function() { $('a.dialog-launch').click( function() { $.fn.dialog.open({ href: $(this).attr('href'),modal:false }); return false; }); }); </script> <div style="width: 760px"> <?php $tp = new TaskPermission(); if ($tp->canBackup()) { ?> <h1><span><?php echo t('Existing Backups'); ?> </span></h1> <div class="ccm-dashboard-inner"> <?php if (count($backups) > 0) { ?> <br/> <table class="grid-list" cellspacing="1" cellpadding="0" border="0"> <tr> <td class="subheader"><?php
public function view() { $tp = new TaskPermission(); $mi = Marketplace::getInstance(); if ($mi->isConnected() && $tp->canInstallPackages()) { Loader::model('marketplace_remote_item'); $mri = new MarketplaceRemoteItemList(); $mri->setItemsPerPage(9); $sets = MarketplaceRemoteItemList::getItemSets('themes'); $setsel = array('' => t('All Items'), 'FEATURED' => t('Featured Items')); if (is_array($sets)) { foreach ($sets as $s) { $setsel[$s->getMarketplaceRemoteSetID()] = $s->getMarketplaceRemoteSetName(); } } $sortBy = array('' => t('Recommended'), 'popular' => t('Popular'), 'recent' => t('Recently Added'), 'rating' => t('Highest Rated'), 'price_low' => t('Price: Low to High'), 'price_high' => t('Price: High to Low')); $mri->setIncludeInstalledItems(false); if (isset($_REQUEST['marketplaceRemoteItemSetID'])) { $set = $_REQUEST['marketplaceRemoteItemSetID']; } if (isset($_REQUEST['mpID'])) { $mri->filterByMarketplaceItemID($_REQUEST['mpID']); } if (isset($_REQUEST['marketplaceRemoteItemSortBy'])) { $this->set('selectedSort', Loader::helper('text')->entities($_REQUEST['marketplaceRemoteItemSortBy'])); $mri->sortBy($_REQUEST['marketplaceRemoteItemSortBy']); } else { $mri->sortBy('recommended'); } if (isset($_REQUEST['marketplaceIncludeOnlyCompatibleAddons']) && $_REQUEST['marketplaceIncludeOnlyCompatibleAddons'] == 1) { $mri->filterByCompatibility(1); } if (isset($_REQUEST['marketplaceRemoteItemKeywords']) && $_REQUEST['marketplaceRemoteItemKeywords']) { $keywords = $_REQUEST['marketplaceRemoteItemKeywords']; $sortBy = array('relevance' => t('Relevance')) + $sortBy; } if ($keywords != '') { $mri->filterByKeywords($keywords); } if ($set == 'FEATURED') { $mri->filterByIsFeaturedRemotely(1); } else { if ($set > 0) { $mri->filterBySet($set); } } $mri->setType('themes'); $mri->execute(); $items = $mri->getPage(); $this->set('sortBy', $sortBy); $this->set('selectedSet', $set); $this->set('list', $mri); $this->set('items', $items); $this->set('form', Loader::helper('form')); $this->set('sets', $setsel); $this->set('pagination', $mri->getPagination()); $this->set('type', $what); } else { $this->redirect('/dashboard/extend/connect'); } }