diff --git a/cms/menu.inc.php b/cms/menu.inc.php
index d112d874b..4464ecf29 100755
--- a/cms/menu.inc.php
+++ b/cms/menu.inc.php
@@ -68,49 +68,51 @@ function drawEntry($item, $sprache)
return;
}
$content = new content();
- $content->getContent($item->child_content_id, $sprache, null, true, true);
- if($content->hasChilds($content->content_id))
+ if($content->getContent($item->child_content_id, $sprache, null, true, true))
{
- echo '
-
- | |
- ';
- if($content->template_kurzbz=='include')
- IncludeMenuAddon($content);
- elseif($content->template_kurzbz=='redirect')
- Redirect($content, $content->content_id);
- else
- DrawLink(APP_ROOT.'cms/content.php?content_id='.$content->content_id,'content',$content->titel, $content->content_id);
-
- echo '
-
- |
-
';
- }
- else
- {
- echo '
-
- | |
- ';
- if($content->template_kurzbz=='include')
- IncludeMenuAddon($content);
- elseif($content->template_kurzbz=='redirect')
- Redirect($content);
- else
- DrawLink(APP_ROOT.'cms/content.php?content_id='.$content->content_id,'content',$content->titel);
+ echo '
+ |
+ | |
+ ';
+ if($content->template_kurzbz=='include')
+ IncludeMenuAddon($content);
+ elseif($content->template_kurzbz=='redirect')
+ Redirect($content, $content->content_id);
+ else
+ DrawLink(APP_ROOT.'cms/content.php?content_id='.$content->content_id,'content',$content->titel, $content->content_id);
- echo '
- |
-
';
+ echo '
+
+
+ ';
+ }
+ else
+ {
+ echo '
+
+ | |
+ ';
+ if($content->template_kurzbz=='include')
+ IncludeMenuAddon($content);
+ elseif($content->template_kurzbz=='redirect')
+ Redirect($content);
+ else
+ DrawLink(APP_ROOT.'cms/content.php?content_id='.$content->content_id,'content',$content->titel);
+
+ echo '
+ |
+
';
+ }
}
}
diff --git a/include/content.class.php b/include/content.class.php
index dd36d4e87..2ff4a6456 100644
--- a/include/content.class.php
+++ b/include/content.class.php
@@ -496,6 +496,11 @@ class content extends basis_db
*/
public function hasChilds($content_id)
{
+ if($content_id=='' || !is_numeric($content_id))
+ {
+ $this->errormsg = 'ContentID ungueltig';
+ return false;
+ }
$qry = "SELECT count(*) as anzahl FROM campus.tbl_contentchild WHERE content_id='".addslashes($content_id)."'";
if($result = $this->db_query($qry))