function getPages($query = null) { Loader::model('page_list'); $db = Loader::db(); $bID = $this->bID; if ($this->bID) { $q = "select * from btDateNav where bID = '{$bID}'"; $r = $db->query($q); if ($r) { $row = $r->fetchRow(); } } else { $row['num'] = $this->num; $row['cParentID'] = $this->cParentID; $row['cThis'] = $this->cThis; $row['orderBy'] = $this->orderBy; $row['ctID'] = $this->ctID; $row['rss'] = $this->rss; } $pl = new PageList(); $pl->setNameSpace('b' . $this->bID); $cArray = array(); //$pl->sortByPublicDate(); $pl->sortByPublicDateDescending(); $num = (int) $row['num']; if ($num > 0) { $pl->setItemsPerPage($num); } $c = $this->getCollectionObject(); if (is_object($c)) { $this->cID = $c->getCollectionID(); } $cParentID = $row['cThis'] ? $this->cID : $row['cParentID']; if ($this->displayFeaturedOnly == 1) { Loader::model('attribute/categories/collection'); $cak = CollectionAttributeKey::getByHandle('is_featured'); if (is_object($cak)) { $pl->filterByIsFeatured(1); } } $pl->filter('cvName', '', '!='); if ($row['ctID']) { $pl->filterByCollectionTypeID($row['ctID']); } $pl->filterByAttribute('exclude_nav', false); if ($row['cParentID'] != 0) { $pl->filterByParentID($cParentID); } if ($num > 0) { $pages = $pl->getPage(); } else { $pages = $pl->get(); } $this->set('pl', $pl); return $pages; }
public function getRequestedSearchResults() { $dh = Loader::helper('concrete/dashboard/sitemap'); if (!$dh->canRead()) { return false; } $pageList = new PageList(); $pageList->ignoreAliases(); $pageList->enableStickySearchRequest(); if ($_REQUEST['submit_search']) { $pageList->resetSearchRequest(); } $req = $pageList->getSearchRequest(); $pageList->displayUnapprovedPages(); $pageList->sortBy('cDateModified', 'desc'); $columns = PageSearchColumnSet::getCurrent(); $this->set('columns', $columns); $cvName = htmlentities($req['cvName'], ENT_QUOTES, APP_CHARSET); if ($cvName != '') { $pageList->filterByName($cvName); } if ($req['cParentIDSearchField'] > 0) { if ($req['cParentAll'] == 1) { $pc = Page::getByID($req['cParentIDSearchField']); $cPath = $pc->getCollectionPath(); $pageList->filterByPath($cPath); } else { $pageList->filterByParentID($req['cParentIDSearchField']); } $parentDialogOpen = 1; } $keywords = htmlentities($req['keywords'], ENT_QUOTES, APP_CHARSET); $pageList->filterByKeywords($keywords); if ($req['numResults']) { $pageList->setItemsPerPage($req['numResults']); } if ($req['ctID']) { $pageList->filterByCollectionTypeID($req['ctID']); } if ($_REQUEST['noKeywords'] == 1) { $pageList->filter('CollectionSearchIndexAttributes.ak_meta_keywords', NULL, '='); $this->set('keywordCheck', true); $parentDialogOpen = 1; } if ($_REQUEST['noDescription'] == 1) { $pageList->filter('CollectionSearchIndexAttributes.ak_meta_description', NULL, '='); $this->set('descCheck', true); $parentDialogOpen = 1; } $this->set('searchRequest', $req); $this->set('parentDialogOpen', $parentDialogOpen); return $pageList; }
function getPages($query = null) { Loader::model('page_list'); $db = Loader::db(); $bID = $this->bID; if ($this->bID) { $q = "select num, cParentID, cThis, orderBy, ctID, displayAliases, rss from btEasyNewsList where bID = '{$bID}'"; $r = $db->query($q); if ($r) { $row = $r->fetchRow(); } } else { $row['num'] = $this->num; $row['cParentID'] = $this->cParentID; $row['cThis'] = $this->cThis; $row['orderBy'] = $this->orderBy; $row['ctID'] = $this->ctID; $row['rss'] = $this->rss; } $pl = new PageList(); $pl->setNameSpace('b' . $this->bID); $cArray = array(); switch ($row['orderBy']) { case 'public_desc': $pl->sortBy('cvDatePublic', 'desc'); break; case 'public_asc': $pl->sortBy('cvDatePublic', 'asc'); break; case 'display_asc': $pl->sortByDisplayOrder(); break; case 'display_desc': $pl->sortByDisplayOrderDescending(); break; case 'chrono_asc': $pl->sortByPublicDate(); break; case 'alpha_asc': $pl->sortByName(); break; case 'alpha_desc': $pl->sortByNameDescending(); break; default: $pl->sortByPublicDateDescending(); break; } $num = (int) $row['num']; if ($num > 0) { $pl->setItemsPerPage($num); } $c = Page::getCurrentPage(); if (is_object($c)) { $this->cID = $c->getCollectionID(); } $cParentID = $row['cThis'] ? $this->cID : $row['cParentID']; Loader::model('attribute/categories/collection'); if ($this->displayFeaturedOnly == 1) { $cak = CollectionAttributeKey::getByHandle('is_featured'); if (is_object($cak)) { $pl->filterByIsFeatured(1); } } if (!$row['displayAliases']) { $pl->filterByIsAlias(0); } $pl->filter('cvName', '', '!='); if ($row['ctID']) { $pl->filterByCollectionTypeID($row['ctID']); } $columns = $db->MetaColumns(CollectionAttributeKey::getIndexedSearchTable()); if (isset($columns['AK_EXCLUDE_PAGE_LIST'])) { $pl->filter(false, '(ak_exclude_page_list = 0 or ak_exclude_page_list is null)'); } if (intval($row['cParentID']) != 0) { $pl->filterByParentID($cParentID); } //Publish Date Filter $dt = Loader::helper('date'); $pl->filter('cvDatePublic', $dt->getLocalDateTime(), '<'); if ($num > 0) { $pages = $pl->getPage(); } else { $pages = $pl->get(); } $this->set('pl', $pl); return $pages; }
public function getRequestedSearchResults() { $dh = Loader::helper('concrete/dashboard/sitemap'); if (!$dh->canRead()) { return false; } $pageList = new PageList(); $pageList->ignoreAliases(); $pageList->enableStickySearchRequest(); if ($_REQUEST['submit_search']) { $pageList->resetSearchRequest(); } $req = $pageList->getSearchRequest(); $pageList->displayUnapprovedPages(); $columns = PageSearchColumnSet::getCurrent(); $this->set('columns', $columns); $cvName = h($req['cvName']); if ($cvName != '') { $pageList->filterByName($cvName); } if ($req['numResults'] && Loader::helper('validation/numbers')->integer($req['numResults'])) { $pageList->setItemsPerPage($req['numResults']); } if ($req['ctID']) { $pageList->filterByCollectionTypeID($req['ctID']); } if (is_array($req['selectedSearchField'])) { foreach ($req['selectedSearchField'] as $i => $item) { // due to the way the form is setup, index will always be one more than the arrays if ($item != '') { switch ($item) { case 'keywords': $keywords = htmlentities($req['keywords'], ENT_QUOTES, APP_CHARSET); $pageList->filterByKeywords($keywords); break; case 'num_children': $symbol = '='; if ($req['cChildrenSelect'] == 'gt') { $symbol = '>'; } else { if ($req['cChildrenSelect'] == 'lt') { $symbol = '<'; } } $pageList->filterByNumberOfChildren($req['cChildren'], $symbol); break; case 'owner': $ui = UserInfo::getByUserName($req['owner']); if (is_object($ui)) { $pageList->filterByUserID($ui->getUserID()); } else { $pageList->filterByUserID(-1); } break; case 'theme': $pageList->filter('ptID', $_REQUEST['ptID']); break; case 'parent': if (isset($req['_cParentAll'])) { $req['cParentAll'] = $req['_cParentAll']; } if ($req['cParentIDSearchField'] > 0) { if ($req['cParentAll'] == 1) { $pc = Page::getByID($req['cParentIDSearchField']); $cPath = $pc->getCollectionPath(); $pageList->filterByPath($cPath); } else { $pageList->filterByParentID($req['cParentIDSearchField']); } } break; case 'version_status': if (isset($req['_cvIsApproved'])) { $req['cvIsApproved'] = $req['_cvIsApproved']; } $pageList->filterByIsApproved($req['cvIsApproved']); break; case 'permissions_inheritance': $pageList->filter('cInheritPermissionsFrom', $req['cInheritPermissionsFrom']); break; case "date_public": $dateFrom = $req['date_public_from']; $dateTo = $req['date_public_to']; if ($dateFrom != '') { $dateFrom = date('Y-m-d', strtotime($dateFrom)); $pageList->filterByPublicDate($dateFrom, '>='); $dateFrom .= ' 00:00:00'; } if ($dateTo != '') { $dateTo = date('Y-m-d', strtotime($dateTo)); $dateTo .= ' 23:59:59'; $pageList->filterByPublicDate($dateTo, '<='); } break; case "last_modified": $dateFrom = $req['last_modified_from']; $dateTo = $req['last_modified_to']; if ($dateFrom != '') { $dateFrom = date('Y-m-d', strtotime($dateFrom)); $pageList->filterByDateLastModified($dateFrom, '>='); $dateFrom .= ' 00:00:00'; } if ($dateTo != '') { $dateTo = date('Y-m-d', strtotime($dateTo)); $dateTo .= ' 23:59:59'; $pageList->filterByDateLastModified($dateTo, '<='); } break; case "date_added": $dateFrom = $req['date_added_from']; $dateTo = $req['date_added_to']; if ($dateFrom != '') { $dateFrom = date('Y-m-d', strtotime($dateFrom)); $pageList->filterByDateAdded($dateFrom, '>='); $dateFrom .= ' 00:00:00'; } if ($dateTo != '') { $dateTo = date('Y-m-d', strtotime($dateTo)); $dateTo .= ' 23:59:59'; $pageList->filterByDateAdded($dateTo, '<='); } break; default: Loader::model('attribute/categories/collection'); $akID = $item; $fak = CollectionAttributeKey::get($akID); if (!is_object($fak) || !$fak instanceof CollectionAttributeKey) { break; } $type = $fak->getAttributeType(); $cnt = $type->getController(); $cnt->setRequestArray($req); $cnt->setAttributeKey($fak); $cnt->searchForm($pageList); break; } } } } $this->set('searchRequest', $req); return $pageList; }
/** * Reindexes the search engine. */ public function reindexAll($fullReindex = false) { Cache::disableLocalCache(); $db = Loader::db(); Loader::model('collection_attributes'); if ($fullReindex) { $db->Execute("truncate table PageSearchIndex"); } $pl = new PageList(); $pl->ignoreAliases(); $pl->ignorePermissions(); $pl->sortByCollectionIDAscending(); $pl->filter(false, '(c.cDateModified > psi.cDateLastIndexed or UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(psi.cDateLastIndexed) > ' . $this->searchReindexTimeout . ' or psi.cID is null or psi.cDateLastIndexed is null)'); $pl->filter(false, '(ak_exclude_search_index is null or ak_exclude_search_index = 0)'); $pages = $pl->get($this->searchBatchSize); $num = 0; foreach ($pages as $c) { // make sure something is approved $cv = $c->getVersionObject(); if (!$cv->cvIsApproved) { continue; } $c->reindex($this, true); $num++; unset($c); } $pnum = Collection::reindexPendingPages(); $num = $num + $pnum; Cache::enableLocalCache(); $result = new stdClass(); $result->count = $num; return $result; }
public function exportPages($xml = null, PageList $pl = null) { if (!$xml) { $this->x = $this->getXMLRoot(); } $node = $this->x->addChild("pages"); if (!$pl) { $pl = new PageList(); } $pl->ignorePermissions(); $pl->ignoreAliases(); $pl->filter(false, 'cFilename is null or cFilename = \'\''); $pages = $pl->get(); foreach ($pages as $pc) { $pc->export($node); } }
/** * Call model data needed by view * * @param int $userID The user ID of who we're viewing * @return null */ public function view($userID = 0) { // Load helpers Loader::model('page_list'); $nh = Loader::helper('navigation'); $ah = Loader::helper('concrete/avatar'); $th = Loader::helper('text'); $ih = Loader::helper('image'); // Set helpers for view // Set the page view first $this->set('bodyData', ['pageViewName' => 'ProfilePageView']); parent::view($userID); // Load the current user $u = new User(); $ui = UserInfo::getByID($u->getUserID()); $profile = $this->get('profile'); // Basic flags identifying the type of user // Whether or not the logged in user is viewing their own "profile" $userIsViewingSelf = $u->getUserID() === $profile->getUserID(); // User is a CO $userIsCityOrganizer = in_array('City Organizers', $profile->getUserObject()->getUserGroups()); /** * New dashboard variables * */ // Remaining variables/logic only needed for "self viewing" if ($userIsViewingSelf) { /** * Helper * */ $html = Loader::helper('html'); $this->addHeaderItem($html->javascript('swfobject.js')); /** * User data * */ // Whether the logged in user has set their first and last name $this->set('userHasSetName', (bool) trim($ui->getAttribute('first_name') . ' ' . $ui->getAttribute('last_name'))); // The home city for the logged in user (false otherwise) $userHomeCity = $ui->getAttribute('home_city'); $this->set('userHomeCity', $userHomeCity); // Whether the logged in user has chosen an avatar/display picture $this->set('userPicture', $ah->getImagePath($ui)); // Walks owned by user $pl = new PageList(); $pl->filterByCollectionTypeHandle('walk'); $pl->filterByUserID($u->getUserID()); // Include the names of draft walks, not last published $pl->displayUnapprovedPages(); $this->set('userWalks', $pl->get()); // Whether the logged in user has created any blog posts $pl = new PageList(); $pl->filterByCollectionTypeHandle(['walk_blog_entry', 'city_blog_entry']); $pl->filterByUserID($u->getUserID()); $this->set('userBlogPosts', $pl->get()); /** * User city data * */ if ($userHomeCity) { // Set the city $city = $ui->getAttribute('home_city'); // Load organizer user for this city $cityOrganizer = UserInfo::getByID($userHomeCity->getCollectionUserID()); if ($cityOrganizer) { // The email address of the city organizer for the logged in user's // home city $cityOrganizerEmailAddress = $cityOrganizer->getUserEmail(); $this->set('cityOrganizerEmailAddress', $cityOrganizerEmailAddress); } // Whether the city has a blog page set up for it $pl = new PageList(); $pl->filterByCollectionTypeHandle('blog'); $pl->filterByParentID($userHomeCity->getCollectionID()); $cityHasBlogSetup = (bool) $pl->getTotal(); $this->set('cityHasBlogSetup', $cityHasBlogSetup); // List of basic data for three walks we want to highlight to city // organizers/walk leaders that showcase creative/unique walks $pl = new PageList(); $pl->filterByCollectionTypeHandle('walk'); $pl->filter(false, 'p1.uID !=' . $u->getUserID()); $pl->filterByAttribute('exclude_page_list', false); $pl->sortBy('RAND()'); // Load this list of featured walks $featuredWalkData = array_map(function ($page) use($nh, $ih) { $_city = Page::getByID($page->getCollectionParentID()); $_country = Page::getByID($_city->getCollectionParentID()); $_thumb = $page->getAttribute('thumbnail'); $countryName = $_country->getCollectionName(); if ($countryName === 'United States') { $countryName = 'United States of America'; } $countryName = str_replace(' ', '_', $countryName); $walkImage = $_thumb ? $ih->getThumbnail($_thumb, 800, 800)->src : ''; return ['walkImagePath' => $walkImage, 'countryName' => $countryName, 'cityName' => $_city->getCollectionName(), 'walkTitle' => $page->getCollectionName(), 'walkPath' => $nh->getLinkToCollection($page)]; }, (array) $pl->get(3)); // Whether the city has any walks posted to it // Whether the city has a blog page set up for it $pl = new PageList(); $pl->filterByCollectionTypeHandle('walk'); $pl->filterByParentID($userHomeCity->getCollectionID()); $pl->filterByAttribute('exclude_page_list', false); $cityWalks = $pl->get(); // Export to view $this->set('cityWalks', $cityWalks); $this->set('cityHasWalks', !empty($cityWalks)); $this->set('city', $city); $this->set('featuredWalkData', $featuredWalkData); // If the user is a city organizer if ($userIsCityOrganizer === true) { // Whether the city organizer's city has its header info set $cityHeaderInfo = $userHomeCity->getCollectionDescription(); $cityHeaderInfoIsEmpty = !trim($cityHeaderInfo); if ($cityHeaderInfoIsEmpty === false) { $cityHeaderInfo = $th->shorten($cityHeaderInfo, 150); } $this->set('cityHeaderInfoIsEmpty', $cityHeaderInfoIsEmpty); $this->set('cityHeaderInfo', $cityHeaderInfo); // Whether the city organizer's city has its short description // set $cityDescription = $userHomeCity->getAttribute('longdescription'); $cityDescriptionIsEmpty = !trim($cityDescription); if ($cityDescriptionIsEmpty === false) { $cityDescription = $th->shorten($cityDescription, 150); } $this->set('cityDescriptionIsEmpty', $cityDescriptionIsEmpty); $this->set('cityDescription', $cityDescription); // Whether the city organizer's city has its background photo // set $cityBackgroundPhotoAttribute = $userHomeCity->getAttribute('full_bg'); $cityBackgroundPhotoIsEmpty = !$cityBackgroundPhotoAttribute; $this->set('cityBackgroundPhotoIsEmpty', $cityBackgroundPhotoIsEmpty); if (!$cityBackgroundPhotoIsEmpty) { $this->set('cityBackgroundPhoto', $cityBackgroundPhotoAttribute->getURL()); } // Whether the header, description and photo are set for the // city organizer's home city $cityHasFullDetails = !($cityHeaderInfoIsEmpty || $cityDescriptionIsEmpty || $cityBackgroundPhotoIsEmpty); $this->set('cityHasFullDetails', $cityHasFullDetails); // Load the cities this CO organizes $pl = new PageList(); $pl->filterByCollectionTypeHandle('city'); $pl->ignoreAliases(); $pl->filterByUserID($u->getUserID()); $cityUsers = []; foreach ($pl->get() as $city) { // Load the user list for this city $ul = new UserList(); $ul->filterByHomeCity($city->getCollectionID()); foreach ($ul->get(65535) as $user) { $cityUsers[] = ['id' => $user->getUserID(), 'firstName' => $user->getAttribute('first_name'), 'lastName' => $user->getAttribute('last_name')]; } } // Sort the users -- needed here for multi-city COs usort($cityUsers, function ($a, $b) { return strcmp(strtoupper($a['first-name']), strtoupper($b['first-name'])); }); $this->set('cityUsers', $cityUsers); // Link to city-editor $this->set('cityComposerURL', View::url('/dashboard/composer/write/-/edit/' . $city->getCollectionID())); } } // Resources $resources = ['showCityOrganizers' => false, 'showGlobalWalks' => true, 'showTips' => true, 'showFiles' => false]; if ($userIsCityOrganizer === true) { $resources['showCityOrganizers'] = true; $resources['showFiles'] = true; // List of basic details for three city organizers that can be // recommended to other city organizers // TODO add an attribute to select 'featured' cities, so we // don't simply grab all cities. Expand this out into a // smart way to recommend other cities. $pl = new PageList(); $pl->filterByCollectionTypeHandle('city'); $pl->filter(false, 'p1.uID !=' . $u->getUserID()); $pl->filterByAttribute('exclude_page_list', false); $pl->sortBy('RAND()'); $recommendedCities = $pl->get(3); $cityOrganizerData = array_map(function ($page) use($ah) { $_co = UserInfo::getByID($page->getCollectionUserID()); return ['cityName' => $page->getCollectionName(), 'organizerImagePath' => $ah->getImagePath($_co), 'organizerName' => trim($_co->getAttribute('first_name') . ' ' . $_co->getAttribute('last_name')), 'organizerEmail' => $_co->getUserEmail()]; }, $pl->get(3)); $this->set('cityOrganizerData', $cityOrganizerData); } $this->set('resources', $resources); } $this->set('nh', $nh); $this->set('u', $u); $this->set('newWalkForm', Page::getByPath('/walk/form')); $this->set('userIsCityOrganizer', $userIsCityOrganizer); $this->set('userIsViewingSelf', $userIsViewingSelf); // Validation helper for form tokens $this->set('valt', Loader::helper('validation/token')); }
<?php defined('C5_EXECUTE') or die("Access Denied."); $pl = new PageList(); $nh = Loader::helper('navigation'); $pl->filterByCollectionTypeHandle('walk'); $pl->filter(false, '(ak_exclude_page_list = 0 or ak_exclude_page_list is null)'); $pages = $pl->get(); $xmlstr = <<<XML <?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://earth.google.com/kml/2.2"> <Document> <name>Jane's Walk Walks</name> <Style id="jwstyle"> <IconStyle id="jwIcon"> <Icon> <href>http://janeswalk.net/images/orange-dot.png</href> </Icon> </IconStyle> </Style> </Document> </kml> XML; /* Set up the KML XML */ // Creates the Document. $doc = new SimpleXMLElement($xmlstr); $doc->preserveWhiteSpace = false; foreach ($pages as $page) { // Creates a coordinates element and gives it the value of the lng and lat columns from the results. $gmap = json_decode($page->getAttribute('gmap'), true); $coordinates = false;
public function getPageList() { Loader::model('page_list'); $db = Loader::db(); $bID = $this->bID; if ($this->bID) { $q = 'select num, cParentID, cThis, orderBy, ctID, displayAliases, rss from btPageList where bID = \'' . $bID . '\''; $r = $db->query($q); if ($r) { $row = $r->fetchRow(); } } else { $row['num'] = $this->num; $row['cParentID'] = $this->cParentID; $row['cThis'] = $this->cThis; $row['orderBy'] = $this->orderBy; $row['ctID'] = $this->ctID; $row['rss'] = $this->rss; $row['displayAliases'] = $this->displayAliases; } $pl = new PageList(); $pl->setNameSpace('b' . $this->bID); $cArray = array(); switch ($row['orderBy']) { case 'display_asc': $pl->sortByDisplayOrder(); break; case 'display_desc': $pl->sortByDisplayOrderDescending(); break; case 'chrono_asc': $pl->sortByPublicDate(); break; case 'alpha_asc': $pl->sortByName(); break; case 'alpha_desc': $pl->sortByNameDescending(); break; case 'random': $pl->sortBy('RAND()'); break; default: $pl->sortByPublicDateDescending(); break; } $num = (int) $row['num']; $pl->setItemsPerPage($num); $c = Page::getCurrentPage(); if (is_object($c)) { $this->cID = $c->getCollectionID(); } Loader::model('attribute/categories/collection'); if ((int) $this->displayFeaturedOnly === 1) { $cak = CollectionAttributeKey::getByHandle('is_featured'); if (is_object($cak)) { $pl->filterByIsFeatured(1); } } if (!$row['displayAliases']) { $pl->filterByIsAlias(0); } $pl->filter('cvName', '', '!='); if ($row['ctID']) { $pl->filterByCollectionTypeID($row['ctID']); } $columns = $db->MetaColumns(CollectionAttributeKey::getIndexedSearchTable()); if (isset($columns['AK_EXCLUDE_PAGE_LIST'])) { $pl->filter(false, '(ak_exclude_page_list = 0 or ak_exclude_page_list is null)'); } if (intval($row['cParentID']) != 0) { $cParentID = $row['cThis'] ? $this->cID : $row['cParentID']; if ($this->includeAllDescendents) { $pl->filterByPath(Page::getByID($cParentID)->getCollectionPath()); } else { $pl->filterByParentID($cParentID); } } return $pl; }
$pl->sortByPublicDateDescending(); break; } // Filter by is_featured attribute if ($row['displayFeaturedOnly'] == 1) { Loader::model('attribute/categories/collection'); $cak = CollectionAttributeKey::getByHandle('is_featured'); if (is_object($cak)) { $pl->filterByIsFeatured(1); } } // Display page aliases if (!$row['displayAliases']) { $pl->filterByIsAlias(0); } $pl->filter('cvName', '', '!='); // Presume this removes any unpublished page versions/page versions with no name? // Filter by page type ID if ($row['ctID']) { $pl->filterByCollectionTypeID($row['ctID']); } // Filter by exclude from page list $columns = $db->MetaColumns(CollectionAttributeKey::getIndexedSearchTable()); if (isset($columns['AK_EXCLUDE_PAGE_LIST'])) { $pl->filter(false, '(ak_exclude_page_list = 0 or ak_exclude_page_list is null)'); } // Set parent page if (intval($row['cParentID']) != 0) { $c = Page::getCurrentPage(); $cParentID = $row['cThis'] ? $row['cID'] : $row['cParentID']; if ($row['includeAllDescendents']) {