Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'wip-MDL-30316-master' of git://github.com/phalacee/moodle
  • Loading branch information
danpoltawski committed Jan 15, 2013
2 parents b1be977 + 0232fa7 commit 37f3f3a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/outputcomponents.php
Expand Up @@ -2272,15 +2272,14 @@ public function prepare(renderer_base $output, moodle_page $page, $target) {
$lastpage = 1;
}

if ($this->page > 15) {
$startpage = $this->page - 10;
if ($this->page > round(($this->maxdisplay/3)*2)) {
$currpage = $this->page - round($this->maxdisplay/3);

$this->firstlink = html_writer::link(new moodle_url($this->baseurl, array($this->pagevar=>0)), '1', array('class'=>'first'));
} else {
$startpage = 0;
$currpage = 0;
}

$currpage = $startpage;
$displaycount = $displaypage = 0;

while ($displaycount < $this->maxdisplay and $currpage < $lastpage) {
Expand Down

0 comments on commit 37f3f3a

Please sign in to comment.