public function run() { Cache::disableCache(); Loader::library('database_indexed_search'); $is = new IndexedSearch(); if ($_GET['force'] == 1) { Loader::model('attribute/categories/collection'); Loader::model('attribute/categories/file'); Loader::model('attribute/categories/user'); $attributes = CollectionAttributeKey::getList(); $attributes = array_merge($attributes, FileAttributeKey::getList()); $attributes = array_merge($attributes, UserAttributeKey::getList()); foreach($attributes as $ak) { $ak->updateSearchIndex(); } $result = $is->reindexAll(true); } else { $result = $is->reindexAll(); } if ($result->count == 0) { return t('Indexing complete. Index is up to date'); } else { if ($result->count == $is->searchBatchSize) { return t('Index partially updated. %s pages indexed (maximum number.) Re-run this job to continue this process.', $result->count); } else { return t('Index updated. %s %s required reindexing.', $result->count, $result->count == 1 ? t('page') : t('pages')); } } }
public function run() { Cache::disableAll(); $is = new IndexedSearch(); if ($_GET['force'] == 1) { $attributes = \CollectionAttributeKey::getList(); $attributes = array_merge($attributes, \FileAttributeKey::getList()); $attributes = array_merge($attributes, \UserAttributeKey::getList()); foreach ($attributes as $ak) { $ak->updateSearchIndex(); } $result = $is->reindexAll(true); } else { $result = $is->reindexAll(); } if ($result->count == 0) { return t('Indexing complete. Index is up to date'); } else { if ($result->count == $is->searchBatchSize) { return t('Index partially updated. %s pages indexed (maximum number.) Re-run this job to continue this process.', $result->count); } else { return t('Index updated.') . ' ' . t2('%d page required reindexing.', '%d pages required reindexing.', $result->count, $result->count); } } }
public function start(Zend_Queue $q) { Loader::library('database_indexed_search'); $this->is = new IndexedSearch(); Loader::model('attribute/categories/collection'); Loader::model('attribute/categories/file'); Loader::model('attribute/categories/user'); $attributes = CollectionAttributeKey::getList(); $attributes = array_merge($attributes, FileAttributeKey::getList()); $attributes = array_merge($attributes, UserAttributeKey::getList()); foreach ($attributes as $ak) { $ak->updateSearchIndex(); } $db = Loader::db(); $db->Execute('truncate table PageSearchIndex'); $r = $db->Execute('select Pages.cID from Pages left join CollectionSearchIndexAttributes csia on Pages.cID = csia.cID where (ak_exclude_search_index is null or ak_exclude_search_index = 0) and cIsActive = 1'); while ($row = $r->FetchRow()) { $q->send($row['cID']); } }
echo $view->action('add'); ?> " id="ccm-attribute-key-form"> <?php Loader::element("attribute/type_form_required", array('category' => $category, 'type' => $type)); ?> </form> <?php } ?> <?php } else { $attribs = UserAttributeKey::getList(); Loader::element('dashboard/attributes_table', array('types' => $types, 'category' => $category, 'attribs' => $attribs, 'editURL' => '/dashboard/users/attributes', 'sortable' => true)); } } ?> <script type="text/javascript"> $(function() { $("ul.ccm-sortable-attribute-list-wrapper").sortable({ handle: 'i.ccm-item-select-list-sort', cursor: 'move', opacity: 0.5, stop: function() { var ualist = $(this).sortable('serialize'); ualist += '&ccm_token=' + '<?php
public function view() { $attribs = UserAttributeKey::getList(); $this->set('attribs', $attribs); }
foreach ($slist as $sk) { $selectedAKIDs[] = $sk->getAttributeKeyID(); } if ($_POST['task'] == 'update_columns') { Loader::model('attribute/category'); $sc = AttributeKeyCategory::getByHandle('user'); $sc->clearAttributeKeyCategoryColumnHeaders(); if (is_array($_POST['akID'])) { foreach ($_POST['akID'] as $akID) { $ak = UserAttributeKey::getByID($akID); $ak->setAttributeKeyColumnHeader(1); } } exit; } $list = UserAttributeKey::getList(); ?> <form method="post" id="ccm-user-customize-search-columns-form" action="<?php echo REL_DIR_FILES_TOOLS_REQUIRED; ?> /users/customize_search_columns/"> <?php echo $form->hidden('task', 'update_columns'); ?> <h1><?php echo t('Additional Searchable Attributes'); ?> </h1>
print t('Unknown'); break; case '0': print t('No'); break; case '1': print t('Yes'); break; }?> </strong></p> <? } ?> <br/> <? $attribs = UserAttributeKey::getList(true); if (count($attribs) > 0) { ?> <h3><?=t('User Attributes')?></h3><br/> <? for ($i = 0; $i < count($attribs); $i++) { $uk = $attribs[$i]; if ($pk->validate($uk)) { ?> <div class="row"> <div class="span5" style=""><p><strong><?=$uk->getAttributeKeyDisplayHandle()?></strong></p></div> <div class="span5"><p> <?=$uo->getAttribute($uk->getAttributeKeyHandle(), 'displaySanitized', 'display')?> </p></div>
<? defined('C5_EXECUTE') or die("Access Denied."); ?> <? $included = $permissionAccess->getAccessListItems(PermissionKey::ACCESS_TYPE_INCLUDE); ?> <? $excluded = $permissionAccess->getAccessListItems(PermissionKey::ACCESS_TYPE_EXCLUDE); ?> <? Loader::model("attribute/categories/user"); ?> <? $attributes = UserAttributeKey::getList(); ?> <? $form = Loader::helper('form'); ?> <? if (count($included) > 0 || count($excluded) > 0) { ?> <? if (count($included) > 0) { ?> <h3><?php echo t('Who can edit what?'); ?> </h3> <? foreach($included as $assignment) { $entity = $assignment->getAccessEntityObject(); ?> <div class="clearfix"> <label><?php echo $entity->getAccessEntityLabel(); ?> </label> <div class="input"> <?php echo $form->select('propertiesIncluded[' . $entity->getAccessEntityID() . ']', array('A' => t('All Attributes'), 'C' => t('Custom')), $assignment->getAttributesAllowedPermission()); ?>