Skip to content
Browse files

Some minor fixes

  • Loading branch information...
1 parent 56a578d commit 2e59502344ed5c535240fafb779a01502e789e3c @Mav Mav committed Mar 4, 2012
Showing with 13 additions and 13 deletions.
  1. +6 −6 Common.php
  2. +7 −7 examples/example_unordered_list.php
View
12 Common.php
@@ -1632,12 +1632,12 @@ function setOptions($options)
}
if (strlen($this->_curTag)) {
- if (strlen($this->_curPageLinkClassName)) {
- $this->_curPageSpanPre = empty($this->_curTag) ? '' : '<' . $this->_curTag . ' class="'.$this->_curPageLinkClassName.'">';
- }else{
- $this->_curPageSpanPre = empty($this->_curTag) ? '' : '<' . $this->_curTag . '>';
- }
- $this->_curPageSpanPost = empty($this->_curTag) ? '' : '</' . $this->_curTag . '>' . $this->_curPageSpanPost;
+ if (strlen($this->_curPageLinkClassName)) {
+ $this->_curPageSpanPre = '<' . $this->_curTag . ' class="'.$this->_curPageLinkClassName.'">' . $this->_curPageSpanPre;
+ }else{
+ $this->_curPageSpanPre = '<' . $this->_curTag . '>' . $this->_curPageSpanPre;
+ }
+ $this->_curPageSpanPost = $this->_curPageSpanPost . '</' . $this->_curTag . '>';
}
$this->_perPage = max($this->_perPage, 1); //avoid possible user errors
View
14 examples/example_unordered_list.php
@@ -21,13 +21,13 @@
'prevImg' => '« Previous',
'nextImg' => ' Next »',
//settings best used for lists:
- 'separator' => '', //you shouldn't use &nbsp; anywhere, especially in lists
- 'spacesBeforeSeparator' => 0, //or spaces
- 'spacesAfterSeparator' => 0,
- 'linkContainer' => 'li', //default is nothing, now optionally wraps links with a html tag
- 'curLinkContainerClassName' => 'active', //if you want <li class="active"><a>page#</a></li>
- 'curTag' => 'a', //default is span as that's what it used to be, now it's changeable
- //'curPageLinkClassName' => 'active', //if you want <li><a class="active">page#</a></li>
+ 'separator' => '', //you shouldn't use &nbsp; anywhere, especially in lists
+ 'spacesBeforeSeparator' => 0, //or spaces
+ 'spacesAfterSeparator' => 0,
+ 'linkContainer' => 'li', //default is nothing, now optionally wraps links with a html tag
+ 'curLinkContainerClassName' => 'active', //if you want <li class="active"><a>page#</a></li>
+ 'curTag' => 'a', //default is span as that's what it used to be, now it's changeable
+ //'curPageLinkClassName' => 'active', //if you want <li><a class="active">page#</a></li> instead of using curLinkContainerClassName
);
$pager = & Pager::factory($params);
$page_data = $pager->getPageData();

0 comments on commit 2e59502

Please sign in to comment.
Something went wrong with that request. Please try again.