本文整理匯總了PHP中JCckDatabase::loadObjectList方法的典型用法代碼示例。如果您正苦於以下問題:PHP JCckDatabase::loadObjectList方法的具體用法?PHP JCckDatabase::loadObjectList怎麽用?PHP JCckDatabase::loadObjectList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類JCckDatabase
的用法示例。
在下文中一共展示了JCckDatabase::loadObjectList方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: onCCK_Storage_LocationAfterRender
public static function onCCK_Storage_LocationAfterRender(&$buffer, &$data, $uri = array())
{
$app = JFactory::getApplication();
if ($uri['layout']) {
return;
}
if ($uri['view'] == 'featured') {
$data['return_view'] = 'featured';
$tag = '&return=featured';
} else {
$data['return_view'] = '';
$tag = '';
}
$class = JCck::on('3.4') ? ' class="hasTooltip"' : '';
$data['doIntegration'] = false;
$data['multilanguage'] = $data['options']->get('multilanguage', 0);
if ($data['multilanguage']) {
$data['search'] = '#<a' . $class . ' href="(.*)index.php\\?option=com_content&task=article.edit' . $tag . '&id=([0-9]*)" (.*)>#U';
} else {
$data['search'] = '#<a' . $class . ' href="(.*)index.php\\?option=com_content&task=article.edit' . $tag . '&id=([0-9]*)"#';
}
$data['search_alt'] = '#<a href = "javascript://" onclick="listItemTask\\(\'cb([0-9]*)\', \'articles.archive\'\\)">(.*)</a>#sU';
if (JCckDevHelper::hasLanguageAssociations() && $data['multilanguage']) {
$query = 'SELECT a.pk, a.cck, b.key, c.language FROM #__cck_core AS a' . ' LEFT JOIN #__associations AS b ON ( b.id = a.pk AND context = "com_content.item" )' . ' LEFT JOIN #__content AS c ON c.id = a.pk' . ' WHERE storage_location="joomla_article"';
$list_assoc = JCckDatabase::loadObjectListArray('SELECT a.id, a.key, b.language FROM #__associations AS a LEFT JOIN #__content AS b ON ( b.id = a.id AND a.context = "com_content.item" )', 'key', 'language');
} else {
$query = 'SELECT pk, cck FROM #__cck_core WHERE storage_location="joomla_article"';
$list_assoc = array();
}
$list = JCckDatabase::loadObjectList($query, 'pk');
$buffer = JCckDevIntegration::rewriteBuffer($buffer, $data, $list, $list_assoc);
}
示例2: getInput
protected function getInput()
{
JPluginHelper::importPlugin('cck_field');
require_once JPATH_PLUGINS . '/cck_field_validation/required/required.php';
$name = 'core_options';
$override = array('rows' => 1);
$storage = (string) $this->element['cck_storage_field_prefix'];
$and = $storage != '' ? ' AND a.storage_field LIKE "' . $storage . '%"' : '';
$fields = JCckDatabase::loadObjectList('SELECT a.title as text, a.name as value FROM #__cck_core_fields AS a' . ' WHERE a.storage = "dev" AND a.id > 500' . $and . ' ORDER BY text');
$fields = is_array($fields) ? array_merge(array(JHtml::_('select.option', '', '- ' . JText::_('COM_CCK_ADD_A_FIELD') . ' -')), $fields) : array();
$html = JHtml::_('select.genericlist', $fields, 'fields_list', 'size="1" class="inputbox select" style="max-width:175px;"', 'value', 'text', '', 'fields_list');
$format = (string) $this->element['js_format'];
$lang = JFactory::getLanguage();
$lang->load('com_cck');
$lang->load('com_cck_default', JPATH_SITE);
if ($format != 'raw') {
JCck::loadjQuery(true, true, true);
}
$force_id = (string) $this->element['id'];
$config = array('asset' => '', 'asset_id' => 0, 'client' => '', 'doTranslation' => 1, 'doValidation' => 2, 'pk' => '');
if ($format == 'raw') {
$config['tmpl'] = 'ajax';
}
$inherit = $force_id != '' ? array('id' => (string) $this->element['id']) : array();
$field = JCckDevField::getObject($name);
if (!$field) {
return;
}
$storage_field = $field->storage_field;
$field->storage_field = $this->name;
$field = JCckDevField::get($field, $this->value, $config, $inherit, $override);
$script = $this->_addScripts((string) $this->element['name'], array('value' => $this->value), $format);
return $field->form . $html . $script;
}
示例3: prepareSidebar
protected function prepareSidebar()
{
if (!JCck::on()) {
return;
}
$buttons = array();
if (JCck::getUIX() == 'compact') {
$core = array(array('val' => '2', 'pre' => '', 'key' => 'COM_CCK_'));
} else {
$core = array(array('val' => '0', 'pre' => '', 'key' => 'COM_CCK_', 'img' => 'cck-application'), array('val' => '2', 'pre' => '- ', 'key' => 'COM_CCK_', 'img' => 'cck-form'), array('val' => '3', 'pre' => '- ', 'key' => '', 'img' => 'cck-plugin'), array('val' => '4', 'pre' => '- ', 'key' => 'COM_CCK_', 'img' => 'cck-search'), array('val' => '1', 'pre' => '- ', 'key' => '', 'img' => 'cck-template'), array('val' => '5', 'pre' => '', 'key' => '', 'img' => 'cck-multisite'));
}
$components = JCckDatabase::loadObjectList('SELECT a.title, a.link, b.element' . ' FROM #__menu AS a LEFT JOIN #__extensions AS b ON b.extension_id = a.component_id' . ' WHERE a.link LIKE "index.php?option=com_cck\\_%"' . ' AND a.link NOT IN ("index.php?option=com_cck_toolbox&view=processing","index.php?option=com_cck_webservices&view=api")' . ' ORDER BY a.title ASC');
$groupedButtons = array();
$more = array('ADDON' => 16, 'PLUGIN_FIELD' => 19, 'PLUGIN_LINK' => 20, 'PLUGIN_LIVE' => 21, 'PLUGIN_RESTRICTION' => 112, 'PLUGIN_TYPOGRAPHY' => 24, 'PLUGIN_VALIDATION' => 25, 'TEMPLATE' => 27);
foreach ($core as $k => $v) {
$buttons[] = array('access' => array('core.manage', 'com_cck'), 'group' => 'COM_CCK_CORE', 'image' => $v['img'], 'link' => JRoute::_(constant('_C' . $v['val'] . '_LINK')), 'target' => '_self', 'text' => $v['pre'] . JText::_($v['key'] . constant('_C' . $v['val'] . '_TEXT') . 'S'));
}
foreach ($components as $k => $v) {
$buttons[] = array('access' => array('core.manage', $v->element), 'group' => 'COM_CCK_SEBLOD_MORE', 'image' => 'cck-addon', 'link' => JRoute::_($v->link), 'target' => '_self', 'text' => $v->title);
}
foreach ($more as $k => $v) {
$buttons[] = array('access' => array('core.manage', 'com_cck'), 'group' => 'COM_CCK_SEBLOD_COM', 'image' => 'download', 'link' => JRoute::_('http://www.seblod.com/products?seb_item_category=' . $v), 'target' => '_blank', 'text' => JText::_('COM_CCK_PANE_MORE_' . $k));
}
foreach ($buttons as $button) {
$groupedButtons[$button['group']][] = $button;
}
$this->sidebar = '<div class="sidebar-nav quick-icons">' . JHtml::_('links.linksgroups', $groupedButtons) . '</div>';
}
示例4: addSubmenu
public static function addSubmenu($option, $vName)
{
$addons = array();
$items = array();
$uix = JCck::getUIX();
$vName2 = JFactory::getApplication()->input->get('filter_e_type', '');
if (JCck::on()) {
$folder = JText::_('COM_CCK_' . _C0_TEXT . 'S');
if ($uix == 'compact') {
$items = array(array('name' => $folder, 'link' => _C0_LINK, 'active' => $vName == _C0_NAME), array('val' => '2', 'pre' => '', 'key' => 'COM_CCK_'));
} else {
$items = array(array('name' => $folder, 'link' => _C0_LINK, 'active' => $vName == _C0_NAME), array('val' => '2', 'pre' => '- ', 'key' => 'COM_CCK_', 'active' => $vName == _C2_NAME || $vName == _C6_NAME && $vName2 == 'type'), array('val' => '3', 'pre' => '- ', 'key' => ''), array('val' => '4', 'pre' => '- ', 'key' => 'COM_CCK_', 'active' => $vName == _C4_NAME || $vName == _C6_NAME && $vName2 == 'search'), array('val' => '1', 'pre' => '- ', 'key' => '', 'active' => $vName == _C1_NAME || $vName == _C7_NAME), array('val' => '5', 'pre' => '', 'key' => ''));
}
if ($vName == 'cck') {
$addons = JCckDatabase::loadObjectList('SELECT a.title, a.link, b.element FROM #__menu AS a LEFT JOIN #__extensions AS b ON b.extension_id = a.component_id' . ' WHERE a.link LIKE "index.php?option=com_cck\\_%" ORDER BY a.title ASC');
}
} else {
$folder = '<img src="' . JROOT_MEDIA_CCK . '/images/12/icon-12-folders.png" border="0" alt=" " width="12" height="12" />';
if ($uix == 'compact') {
$items = array(array('val' => '2', 'pre' => '', 'key' => 'COM_CCK_'), array('name' => $folder, 'link' => _C0_LINK, 'active' => $vName == _C0_NAME));
} else {
$items = array(array('val' => '2', 'pre' => '', 'key' => 'COM_CCK_'), array('val' => '3', 'pre' => '', 'key' => ''), array('val' => '4', 'pre' => '', 'key' => 'COM_CCK_'), array('val' => '1', 'pre' => '', 'key' => ''), array('name' => $folder, 'link' => _C0_LINK, 'active' => $vName == _C0_NAME), array('val' => '5', 'pre' => '', 'key' => ''));
}
}
self::addSubmenuEntries($option, $vName, $items, $addons);
}
示例5: getFields
public static function getFields($type, $client, $stage, $excluded, $idx, $cck = false)
{
// Client
if ($client == 'all') {
$where = ' WHERE b.name = "' . $type . '"';
} else {
$where = ' WHERE b.name = "' . $type . '" AND c.client = "' . $client . '"';
}
if ($stage > -1) {
$where .= ' AND c.stage = ' . (int) $stage;
}
if ($excluded != '') {
$where .= ' AND a.id NOT IN (' . $excluded . ')';
}
//$where .= ' AND c.variation != "none"';
// Access
$user = JFactory::getUser();
$access = implode(',', $user->getAuthorisedViewLevels());
$where .= ' AND c.access IN (' . $access . ')';
$query = 'SELECT DISTINCT a.*, c.client,' . ' c.label as label2, c.variation, c.variation_override, c.required, c.required_alert, c.validation, c.validation_options, c.live, c.live_options, c.live_value, c.markup, c.markup_class, c.stage, c.access, c.restriction, c.restriction_options, c.computation, c.computation_options, c.conditional, c.conditional_options, c.position' . ' FROM #__cck_core_fields AS a ' . ' LEFT JOIN #__cck_core_type_field AS c ON c.fieldid = a.id' . ' LEFT JOIN #__cck_core_types AS b ON b.id = c.typeid' . $where . ' ORDER BY c.ordering ASC';
$fields = $idx ? JCckDatabase::loadObjectList($query, 'name') : JCckDatabase::loadObjectList($query);
//#
if (!count($fields)) {
$fields = array();
}
return $fields;
}
示例6: loadObjectList
public static function loadObjectList($query, $key = null)
{
static $cache = array();
$idx = md5($query);
if (!isset($cache[$idx])) {
$cache[$idx] = parent::loadObjectList($query, $key);
}
return $cache[$idx];
}
示例7: _setMultisite
public static function _setMultisite()
{
if ((int) self::getConfig_Param('multisite', 0)) {
self::$_host = JURI::getInstance()->getHost();
self::$_sites = JCckDatabase::loadObjectList('SELECT id, title, name, guest, guest_only_viewlevel, groups, viewlevels, configuration, options FROM #__cck_core_sites WHERE published = 1', 'name');
return true;
} else {
return false;
}
}
示例8: run
public static function run($name)
{
$processings = JCckDatabase::loadObjectList('SELECT a.type, a.scriptfile, a.options' . ' FROM #__cck_more_processings AS a' . ' LEFT JOIN #__cck_more_job_processing AS b ON b.processing_id = a.id' . ' LEFT JOIN #__cck_more_jobs AS c ON c.id = b.job_id' . ' WHERE c.name = "' . $name . '" AND c.published = 1 AND a.published = 1' . ' ORDER BY b.id');
if (count($processings)) {
foreach ($processings as $p) {
if (is_object($p) && is_file(JPATH_SITE . $p->scriptfile)) {
$options = new JRegistry($p->options);
include_once JPATH_SITE . $p->scriptfile;
}
}
}
}
示例9: quickSession
public static function quickSession($options, $id = 'featured_session')
{
$doc = JFactory::getDocument();
$css = '
ul.toolbar-tiplist {padding: 0px; margin-left:0px; margin-right:0px;}
ul.toolbar-tiplist li { list-style: none; padding: 5px;}
ul.toolbar-tiplist li:hover {background-color: #ffffff; -webkit-border-radius: 1px; -moz-border-radius: 1px; border-radius: 1px;}
.ui-tooltip-grey .ui-tooltip-content{background-color: #ffffff;}
.ui-tooltip-rounded .ui-tooltip-titlebar{-webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px;}
.ui-tooltip-rounded .ui-tooltip-titlebar + .ui-tooltip-content{-webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px;}
';
$doc->addStyleDeclaration($css);
$doc->addStyleSheet(JURI::root(true) . '/media/cck/scripts/jquery-qtip/css/jquery.qtip.css');
JCck::loadjQuery();
$doc->addScript(JURI::root(true) . '/media/cck/scripts/jquery-qtip/js/jquery.qtip.min.js');
$title = JText::_('COM_CCK_SESSIONS_SAVE_SELECT');
$html = '';
$where = 'extension="' . $options['extension'] . '"';
if (isset($options['folder'])) {
$where .= 'type="' . $options['folder'] . '"';
}
if (isset($options['type'])) {
$where .= 'type="' . $options['type'] . '"';
}
$items = JCckDatabase::loadObjectList('SELECT id, title, type, options FROM #__cck_more_sessions WHERE ' . $where . ' ORDER BY title');
if (!count($items)) {
return;
}
foreach ($items as $item) {
$html .= '<li><a class="featured_sessions" href="javascript:void(0);" mydata="' . $item->type . '"' . 'mydata2="' . htmlspecialchars($item->options) . '">' . $item->title . '</a>' . '<img class="featured_sessions_del" src="' . JROOT_MEDIA_CCK . '/images/14/icon-14-trash.png" mydata="' . $item->id . '" /></li>';
}
// Tooltip
$html = '<div><ul class="toolbar-tiplist">' . $html . '</ul></div>' . '<div class="clr"></div>';
$search = array('.', '<', '>', '"', '%', ';');
$replace = array('\\.', '\\<', '\\>', '\\"', '\\%', '\\;');
$html = preg_replace("/(\r\n|\n|\r)/", " ", $html);
$html = str_replace($search, $replace, $html);
$js = '
jQuery(document).ready(function($){
$("#' . $id . '").qtip({
prerender: true,
content: { text: "' . $html . '", title: { text: "' . $title . '" } },
hide: { event: "unfocus" },
style: { tip: true, classes: "ui-tooltip-grey ui-tooltip-rounded" },
position: { at: "right center", my: "left center", adjust: { x: 23 } }
});
});
';
$doc->addScriptDeclaration($js);
}
示例10: getItems
public function getItems()
{
if ($items = parent::getItems()) {
$group_map = JCckDatabase::loadObjectList('SELECT a.group_id, COUNT( DISTINCT a.user_id ) AS num FROM #__user_usergroup_map AS a GROUP BY a.group_id', 'group_id');
foreach ($items as $item) {
$viewlevels = $item->guest_only_viewlevel ? $item->guest_only_viewlevel . ',' . $item->viewlevels : $item->viewlevels;
$query = 'SELECT COUNT(a.id) FROM #__cck_core AS a LEFT JOIN #__content AS b ON b.id = a.pk WHERE a.storage_location = "joomla_article" AND b.access IN (' . $viewlevels . ');';
$item->articles = JCckDatabase::loadResult($query);
$groups = $item->guest_only_group ? $item->guest_only_group . ',' . $item->groups : $item->groups;
$query = 'SELECT COUNT(DISTINCT a.user_id) FROM #__user_usergroup_map AS a WHERE a.group_id IN (' . $groups . ');';
$item->users = JCckDatabase::loadResult($query);
}
}
return $items;
}
示例11: getItems
public function getItems()
{
if ($items = parent::getItems()) {
$templates = JCckDatabase::loadObjectList('SELECT a.folder, COUNT( a.folder ) AS num FROM #__cck_core_templates AS a GROUP BY a.folder', 'folder');
$types = JCckDatabase::loadObjectList('SELECT a.folder, COUNT( a.folder ) AS num FROM #__cck_core_types AS a GROUP BY a.folder', 'folder');
$fields = JCckDatabase::loadObjectList('SELECT a.folder, COUNT( a.folder ) AS num FROM #__cck_core_fields AS a GROUP BY a.folder', 'folder');
$searchs = JCckDatabase::loadObjectList('SELECT a.folder, COUNT( a.folder ) AS num FROM #__cck_core_searchs AS a GROUP BY a.folder', 'folder');
foreach ($items as $item) {
$item->templates_nb = @$templates[$item->id]->num ? $templates[$item->id]->num : 0;
$item->types_nb = @$types[$item->id]->num ? $types[$item->id]->num : 0;
$item->fields_nb = @$fields[$item->id]->num ? $fields[$item->id]->num : 0;
$item->searchs_nb = @$searchs[$item->id]->num ? $searchs[$item->id]->num : 0;
}
}
return $items;
}
示例12: createVersion
public static function createVersion($type, $pk, $note = '', $update = false)
{
$table = JTable::getInstance($type, 'CCK_Table');
$table->load($pk);
// Core
if (isset($table->asset_id)) {
$table->rules = JCckDatabase::loadResult('SELECT rules FROM #__assets WHERE id = ' . (int) $table->asset_id);
}
$version_num = $table->version;
if ($update !== false) {
unset($table->rules);
$table->version++;
$table->store();
}
// Version
$version = JTable::getInstance('version', 'CCK_Table');
$version->e_id = $table->id;
$version->e_title = $table->title;
$version->e_name = $table->name;
$version->e_type = $type;
$version->e_core = JCckDev::toJSON($table);
$version->e_version = $version_num;
$version->date_time = JFactory::getDate()->toSql();
$version->user_id = JFactory::getUser()->get('id');
if ($note) {
$version->note = $note;
}
// More
$clients = $type == 'search' ? array(1 => 'search', 2 => 'filter', 3 => 'list', 4 => 'item', 5 => 'order') : array(1 => 'admin', 2 => 'site', 3 => 'intro', 4 => 'content');
$count = 0;
$e_more = array();
foreach ($clients as $i => $client) {
$name = 'e_more' . $i;
$fields = JCckDatabase::loadObjectList('SELECT * FROM #__cck_core_' . $type . '_field WHERE ' . $type . 'id = ' . $pk . ' AND client ="' . $client . '" ORDER BY ordering');
$positions = JCckDatabase::loadObjectList('SELECT * FROM #__cck_core_' . $type . '_position WHERE ' . $type . 'id = ' . $pk . ' AND client ="' . $client . '"');
$data = array('fields' => $fields, 'positions' => $positions);
$e_more[$i] = (string) count($fields);
$version->{$name} = JCckDev::toJSON($data);
}
$version->e_more = JCckDev::toJSON(array('fields' => $e_more));
// --
$version->check();
if (!$version->store()) {
return false;
}
return true;
}
示例13: delete
function delete($pks = array())
{
JPluginHelper::importPlugin('content');
JPluginHelper::importPlugin('cck_storage_location');
$nb = 0;
$pks_in = implode(',', $pks);
$items = JCckDatabase::loadObjectList('SELECT a.id, a.cck, a.pk, a.pkb, a.storage_location, a.storage_table, a.author_id, b.id as type_id FROM #__cck_core as a' . ' LEFT JOIN #__cck_core_types AS b ON b.name = a.cck' . ' WHERE a.id IN (' . $pks_in . ')', 'id');
$config = array('author' => 0, 'type' => '', 'type_id' => 0);
foreach ($pks as $pk) {
$location = $items[$pk]->storage_location;
if ($location) {
$config['author'] = $items[$pk]->author_id;
$config['type'] = $items[$pk]->cck;
$config['type_id'] = $items[$pk]->type_id;
if (JCck::callFunc_Array('plgCCK_Storage_Location' . $location, 'onCCK_Storage_LocationDelete', array($items[$pk]->pk, &$config))) {
$nb++;
}
}
}
return $nb;
}
示例14: getItems
public function getItems()
{
if ($items = parent::getItems()) {
$search = JCckDatabase::loadObjectList('SELECT a.searchid, COUNT( a.searchid ) AS num FROM #__cck_core_search_field AS a' . ' WHERE a.client = "search" GROUP BY a.searchid', 'searchid');
$order = JCckDatabase::loadObjectList('SELECT a.searchid, COUNT( a.searchid ) AS num FROM #__cck_core_search_field AS a' . ' WHERE a.client = "order" GROUP BY a.searchid', 'searchid');
$list = JCckDatabase::loadObjectList('SELECT a.searchid, COUNT( a.searchid ) AS num FROM #__cck_core_search_field AS a' . ' WHERE a.client = "list" GROUP BY a.searchid', 'searchid');
$item = JCckDatabase::loadObjectList('SELECT a.searchid, COUNT( a.searchid ) AS num FROM #__cck_core_search_field AS a' . ' WHERE a.client = "item" GROUP BY a.searchid', 'searchid');
$version = JCckDatabase::loadObjectList('SELECT a.e_id, COUNT( a.e_id ) AS num FROM #__cck_core_versions AS a' . ' WHERE a.e_type = "search" GROUP BY a.e_id', 'e_id');
$styles = JCckDatabase::loadObjectList('SELECT a.id, a.template FROM #__template_styles AS a', 'id');
foreach ($items as $i) {
$i->searchFields = @$search[$i->id]->num ? $search[$i->id]->num : 0;
$i->orderFields = @$order[$i->id]->num ? $order[$i->id]->num : 0;
$i->listFields = @$list[$i->id]->num ? $list[$i->id]->num : 0;
$i->itemFields = @$item[$i->id]->num ? $item[$i->id]->num : 0;
$i->searchTemplate = @$styles[$i->template_search]->template;
$i->orderTemplate = '';
$i->listTemplate = @$styles[$i->template_list]->template;
$i->itemTemplate = @$styles[$i->template_item]->template;
$i->versions = @$version[$i->id]->num ? $version[$i->id]->num : 0;
}
}
return $items;
}
示例15: getItems
public function getItems()
{
if ($items = parent::getItems()) {
$admin = JCckDatabase::loadObjectList('SELECT a.typeid, COUNT( a.typeid ) AS num FROM #__cck_core_type_field AS a' . ' WHERE a.client = "admin" GROUP BY a.typeid', 'typeid');
$site = JCckDatabase::loadObjectList('SELECT a.typeid, COUNT( a.typeid ) AS num FROM #__cck_core_type_field AS a' . ' WHERE a.client = "site" GROUP BY a.typeid', 'typeid');
$intro = JCckDatabase::loadObjectList('SELECT a.typeid, COUNT( a.typeid ) AS num FROM #__cck_core_type_field AS a' . ' WHERE a.client = "intro" GROUP BY a.typeid', 'typeid');
$content = JCckDatabase::loadObjectList('SELECT a.typeid, COUNT( a.typeid ) AS num FROM #__cck_core_type_field AS a' . ' WHERE a.client = "content" GROUP BY a.typeid', 'typeid');
$version = JCckDatabase::loadObjectList('SELECT a.e_id, COUNT( a.e_id ) AS num FROM #__cck_core_versions AS a' . ' WHERE a.e_type = "type" GROUP BY a.e_id', 'e_id');
$styles = JCckDatabase::loadObjectList('SELECT a.id, a.template FROM #__template_styles AS a', 'id');
foreach ($items as $i) {
$i->adminFields = @$admin[$i->id]->num ? $admin[$i->id]->num : 0;
$i->siteFields = @$site[$i->id]->num ? $site[$i->id]->num : 0;
$i->introFields = @$intro[$i->id]->num ? $intro[$i->id]->num : 0;
$i->contentFields = @$content[$i->id]->num ? $content[$i->id]->num : 0;
$i->adminTemplate = @$styles[$i->template_admin]->template;
$i->siteTemplate = @$styles[$i->template_site]->template;
$i->introTemplate = @$styles[$i->template_intro]->template;
$i->contentTemplate = @$styles[$i->template_content]->template;
$i->versions = @$version[$i->id]->num ? $version[$i->id]->num : 0;
}
}
return $items;
}