summaryrefslogtreecommitdiff
path: root/modules/gallery/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/libraries')
-rw-r--r--modules/gallery/libraries/Gallery_View.php2
-rw-r--r--modules/gallery/libraries/Theme_View.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/gallery/libraries/Gallery_View.php b/modules/gallery/libraries/Gallery_View.php
index bdfd2fc9..3bf56d0f 100644
--- a/modules/gallery/libraries/Gallery_View.php
+++ b/modules/gallery/libraries/Gallery_View.php
@@ -125,7 +125,7 @@ class Gallery_View_Core extends View {
if (preg_match_all($PATTERN, $css, $matches, PREG_SET_ORDER)) {
$search = $replace = array();
foreach ($matches as $match) {
- $relative = substr(realpath(dirname($css_file) . "/$match[1]"), $docroot_length);
+ $relative = dirname($css_file) . "/$match[1]";
if (!empty($relative)) {
$search[] = $match[0];
$replace[] = "url('" . url::abs_file($relative) . "')";
diff --git a/modules/gallery/libraries/Theme_View.php b/modules/gallery/libraries/Theme_View.php
index b1167d0e..b64deab9 100644
--- a/modules/gallery/libraries/Theme_View.php
+++ b/modules/gallery/libraries/Theme_View.php
@@ -172,7 +172,7 @@ class Theme_View_Core extends Gallery_View {
$v->first_visible_position = ($this->page - 1) * $this->page_size + 1;
$v->last_visible_position = min($this->page * $this->page_size, $v->total);
- } else {
+ } else if ($this->page_type == "item") {
$v->position = $this->position;
$v->total = $this->sibling_count;
if ($this->previous_item) {