Bug #32756 » patch_32756.diff

Ronny Vorpahl, 2011-12-22 15:20

View differences:

typo3_src-4.5.9_32756/typo3/sysext/cms/tslib/class.tslib_content.php 2011-12-22 12:03:04.342714000 +0100
7237 7237
					if ($dontCheckEnableFields || $GLOBALS['TSFE']->checkPagerecordForIncludeSection($row)) {
7238 7238
							// Add ID to list:
7239 7239
						if ($begin <= 0) {
7240
							if ($dontCheckEnableFields || $GLOBALS['TSFE']->checkEnableFields($row)) {
7240
							if ($dontCheckEnableFields || tslib_cObj::checkEnableFields_getTreeList($row)) {
7241 7241
								$theList .= $next_id . ',';
7242 7242
							}
7243 7243
						}
......
7291 7291
		return $theList;
7292 7292
	}
7293 7293

  
7294
	
7295
	/** 
7296
	 * checkEnableFields and checkPageGroupAccess TAKEN FROM class.tslib_fe.php
7297
	 * Checks page record for enableFields
7298
	 * Returns true if enableFields does not disable the page record.
7299
	 *
7300
	 * @param	array		The page record to evaluate (needs fields: hidden, starttime, endtime, fe_group)
7301
	 * @return	boolean		True, if record is viewable.
7302
	 * @see tslib_cObj::getTreeList(), checkPagerecordForIncludeSection()
7303
	 */
7304
	function checkEnableFields_getTreeList($row) {
7305
		if ((!$row['hidden'] || $GLOBALS['TSFE']->showHiddenPage)
7306
			&& $row['starttime']<=$GLOBALS['SIM_ACCESS_TIME']
7307
			&& ($row['endtime']==0 || $row['endtime']>$GLOBALS['SIM_ACCESS_TIME'])
7308
		) {
7309
			$groupList = $GLOBALS['TSFE']->gr_list;
7310
			if(!is_array($groupList)) {
7311
				$groupList = explode(',', $groupList);
7312
			}
7313

  
7314
			$pageGroupList = explode(',', $row['fe_group'] ? $row['fe_group'] : 0);
7315
			return count(array_intersect($groupList, $pageGroupList)) > 0;
7316
		}
7317
	}	
7318
	
7319
	
7294 7320
	/**
7295 7321
	 * Returns a part for a WHERE clause (without preceeding operator) which will select records based on the presence of a certain string in a string-list inside the record.
7296 7322
	 * Example: If you have a record with a field, "usergroup" and that field might contain a list like "1,2,3" (with no spaces between the values) then you can select all records having eg. "2" in this list by calling this function. This is regardless of whether the number "2" is in the start, end or middle of the list - or the only value at all.
(1-1/3)