<commit_before><?php
/*"******************************************************************************************************
*   (c) 2004-2006 by MulchProductions, www.mulchprod.de                                                 *
*   (c) 2007-2010 by Kajona, www.kajona.de                                                              *
*       Published under the GNU LGPL v2.1, see /system/licence_lgpl.txt                                 *
*-------------------------------------------------------------------------------------------------------*
*	$Id$                                     *
********************************************************************************************************/

/**
 * Portal-Part of the paragraph
 *
 * @package modul_pages
 */
class class_element_absatz extends class_element_portal implements  interface_portal_element {

	/**
	 * Constructor
	 *
	 * @param mixed $arrElementData
	 */
	public function __construct($objElementData) {
        $arrModule = array();
		$arrModule["name"] 			= "element_absatz";
		$arrModule["author"] 		= "<EMAIL>";
		$arrModule["moduleId"] 		= _pages_elemente_modul_id_;
		$arrModule["table"]			= _dbprefix_."element_absatz";

		parent::__construct($arrModule, $objElementData);
	}


	/**
	 * Does a little "make-up" to the contents
	 *
	 * @return string
	 */
	public function loadData() {

		$strReturn = "";
		//Titel gegeben?
		if($this->arrElementData["absatz_titel"] != "")
			$strReturn .= "<h2>".$this->arrElementData["absatz_titel"] . "</h2>\n";
		//Inhalt?
		if($this->arrElementData["absatz_inhalt"] != "")
			$strReturn .= "<p>".$this->arrElementData["absatz_inhalt"] . "<p>\n";
		//Bild?
		if($this->arrElementData["absatz_bild"] != "")
			$strReturn .= "<img src=\"".$this->arrElementData["absatz_bild"]."\" alt=\"".$this->arrElementData["absatz_bild"]."\" /><br /><br />\n";
		//Link?
		if($this->arrElementData["absatz_link"] != "") {
		    //internal page?
		    $objPage = class_modul_pages_page::getPageByName($this->arrElementData["absatz_link"]);
		    if($objPage->getStrName() != "")
			    $strReturn .= "<a href=\"".getLinkPortalHref($this->arrElementData["absatz_link"], "")."\" target=\"_self\" >".$this->arrElementData["absatz_link"]."</a>\n";
			else
			    $strReturn .= "<a href=\"".getLinkPortalHref("",$this->arrElementData["absatz_link"])."\" target=\"_self\" >".$this->arrElementData["absatz_link"]."</a>\n";
		}


		return $strReturn;
	}

}	 //class_element_absatz
?><commit_msg>BUG: wrong end-tag for <p> in class_element_absatz led to invalid HTML code<commit_after><?php
/*"******************************************************************************************************
*   (c) 2004-2006 by MulchProductions, www.mulchprod.de                                                 *
*   (c) 2007-2010 by Kajona, www.kajona.de                                                              *
*       Published under the GNU LGPL v2.1, see /system/licence_lgpl.txt                                 *
*-------------------------------------------------------------------------------------------------------*
*	$Id$                                     *
********************************************************************************************************/

/**
 * Portal-Part of the paragraph
 *
 * @package modul_pages
 */
class class_element_absatz extends class_element_portal implements  interface_portal_element {

	/**
	 * Constructor
	 *
	 * @param mixed $arrElementData
	 */
	public function __construct($objElementData) {
        $arrModule = array();
		$arrModule["name"] 			= "element_absatz";
		$arrModule["author"] 		= "<EMAIL>";
		$arrModule["moduleId"] 		= _pages_elemente_modul_id_;
		$arrModule["table"]			= _dbprefix_."element_absatz";

		parent::__construct($arrModule, $objElementData);
	}


	/**
	 * Does a little "make-up" to the contents
	 *
	 * @return string
	 */
	public function loadData() {

		$strReturn = "";
		//Titel gegeben?
		if($this->arrElementData["absatz_titel"] != "")
			$strReturn .= "<h2>".$this->arrElementData["absatz_titel"] . "</h2>\n";
		//Inhalt?
		if($this->arrElementData["absatz_inhalt"] != "")
			$strReturn .= "<p>".$this->arrElementData["absatz_inhalt"] . "</p>\n";
		//Bild?
		if($this->arrElementData["absatz_bild"] != "")
			$strReturn .= "<img src=\"".$this->arrElementData["absatz_bild"]."\" alt=\"".$this->arrElementData["absatz_bild"]."\" /><br /><br />\n";
		//Link?
		if($this->arrElementData["absatz_link"] != "") {
		    //internal page?
		    $objPage = class_modul_pages_page::getPageByName($this->arrElementData["absatz_link"]);
		    if($objPage->getStrName() != "")
			    $strReturn .= "<a href=\"".getLinkPortalHref($this->arrElementData["absatz_link"], "")."\" target=\"_self\" >".$this->arrElementData["absatz_link"]."</a>\n";
			else
			    $strReturn .= "<a href=\"".getLinkPortalHref("",$this->arrElementData["absatz_link"])."\" target=\"_self\" >".$this->arrElementData["absatz_link"]."</a>\n";
		}


		return $strReturn;
	}

}	 //class_element_absatz
?>
{'fraction_non_alphanumeric': 0.2929974211465979, 'fraction_numerical': 0.007934933544931562, 'mean_word_length': 2.6910688140556367, 'pattern_counts': {'":': 0, '<': 30, '<?xml version=': 0, '>': 58, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3221625', 'n_tokens_mistral': 1636, 'n_tokens_neox': 1485, 'n_words': 221}