X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fsection.php;h=2d8d6f3673f50233ec266a964f22ea8a27297f45;hb=360492472c7f5424670b01541ebc4ddc87ff27e3;hp=d77673898a7d5ab7119bcd6afc4dc7e477f7b2d8;hpb=f47027abbefe35d17df50c67eec7cd1156a5e39a;p=quix0rs-gnu-social.git diff --git a/lib/section.php b/lib/section.php index d77673898a..2d8d6f3673 100644 --- a/lib/section.php +++ b/lib/section.php @@ -61,6 +61,19 @@ class Section extends Widget array('id' => $this->divId(), 'class' => 'section')); + $this->showTitle(); + + $have_more = $this->showContent(); + + if ($have_more) { + $this->showMore(); + } + + $this->out->elementEnd('div'); + } + + function showTitle() + { $link = $this->link(); if (!empty($link)) { $this->out->elementStart('h2'); @@ -70,18 +83,15 @@ class Section extends Widget $this->out->element('h2', null, $this->title()); } + } - $have_more = $this->showContent(); - - if ($have_more) { - $this->out->elementStart('p'); - $this->out->element('a', array('href' => $this->moreUrl(), - 'class' => 'more'), - $this->moreTitle()); - $this->out->elementEnd('p'); - } - - $this->out->elementEnd('div'); + function showMore() + { + $this->out->elementStart('p'); + $this->out->element('a', array('href' => $this->moreUrl(), + 'class' => 'more'), + $this->moreTitle()); + $this->out->elementEnd('p'); } function divId()