core-bundle/src/Resources/contao/classes/StyleSheets.php
public function checkStyleSheetName($strName)
	{
		$objStyleSheet = $this->Database->prepare("SELECT COUNT(*) AS count FROM tl_style_sheet WHERE name=?")
										->limit(1)
										->execute($strName);

		if ($objStyleSheet->count < 1)
		{
			return $strName;
		}

		$chunks = explode('-', $strName);
		$i = (\count($chunks) > 1) ? array_pop($chunks) : 0;
		$strName = implode('-', $chunks) . '-' . ((int) $i + 1);

		return $this->checkStyleSheetName($strName);
	}
public function checkStyleSheetName($strName)
	{
		$objStyleSheet = $this->Database->prepare("SELECT COUNT(*) AS count FROM tl_style_sheet WHERE name=?")
										->limit(1)
										->execute($strName);

		if ($objStyleSheet->count < 1)
		{
			return $strName;
		}

		$chunks = explode('-', $strName);
		$i = (\count($chunks) > 1) ? array_pop($chunks) : 0;
		$strName = implode('-', $chunks) . '-' . ((int) $i + 1);

		return $this->checkStyleSheetName($strName);
	}
public function checkStyleSheetName ( $ strName ) { $ objStyleSheet = $ this -> Database -> prepare ( "SELECT COUNT(*) AS count FROM tl_style_sheet WHERE name=?" ) -> limit ( 1 ) -> execute ( $ strName ) ; if ( $ objStyleSheet -> count < 1 ) { return $ strName ; } $ chunks = explode ( '-' , $ strName ) ; $ i = ( \ count ( $ chunks ) > 1 ) ? array_pop ( $ chunks ) : 0 ; $ strName = implode ( '-' , $ chunks ) . '-' . ( ( int ) $ i + 1 ) ; return $ this -> checkStyleSheetName ( $ strName ) ; }
Check the name of an imported file

@param string $strName

@return string
Check the name of an imported file