Skip to content

Commit 497fed9

Browse files
Xiphoseerluelista
authored andcommitted
fix paths
1 parent 556f57f commit 497fed9

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

functions.php

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,21 +75,20 @@ function show_directory($path, $currpath) {
7575

7676
$currpath = str_replace('//','/',$currpath);
7777
$currpath = str_replace('\\\\','/',$currpath);
78-
if ($currpath == '/') $currpath = '';
7978

8079
$dir = get_dir($path, $currpath, 'd');
8180

8281
// Backlink to parent directory
83-
if ($currpath != '')
84-
$r .= '<li><a href="'.$BASE_URI.'/p/'.$currpath.'../">[up]</a></li>'."\n";
82+
if ($currpath != '/')
83+
$r .= '<li><a href="'.$BASE_URI.'/p'.$currpath.'../">[up]</a></li>'."\n";
8584

8685
// Display directory list
8786
foreach($dir as $d) {
8887
if (!legal_image($path.$currpath.'/'.$d, $pictures_path)) {
8988
$r .= "#1 Illegaler Pfad! ($d)";
9089
return $r;
9190
}
92-
$r .= '<li><a href="'.$BASE_URI.'/p/'.$currpath.$d.'/'.'">'.$d.'</a></li>'."\n";
91+
$r .= '<li><a href="'.$BASE_URI.'/p'.$currpath.$d.'/'.'">'.$d.'</a></li>'."\n";
9392
}
9493
return $r;
9594
} // show_directory()
@@ -143,7 +142,7 @@ function show_pictures($path, $currpath) {
143142

144143

145144
}
146-
$r .= '</div><a href="'.$BASE_URI.'/p/'.$currpath.$_d.'/'.'">';
145+
$r .= '</div><a href="'.$BASE_URI.'/p'.$currpath.$_d.'/'.'">';
147146
$r .= 'Mehr...';
148147
$r .= "</a>\n";
149148
}
@@ -160,7 +159,7 @@ function show_pictures($path, $currpath) {
160159
if ($start >= $i && $start < $show_to)
161160
$r .= '<b>['. ($i + 1) .'-'. ($show_to) .']</b> ';
162161
else
163-
$r .= '[<a href="'.$BASE_URI.'/p/'.$currpath.'?n='.($i).'">'. ($i + 1) .'-'. ($show_to) .'</a>] ';
162+
$r .= '[<a href="'.$BASE_URI.'/p'.$currpath.'?n='.($i).'">'. ($i + 1) .'-'. ($show_to) .'</a>] ';
164163
}
165164
$r .= '</p>';
166165

@@ -185,9 +184,9 @@ function show_pictures($path, $currpath) {
185184
$size[3] = $size[3];
186185
#print_r($size);
187186

188-
$r .= '<a href="'.$BASE_URI.'/c/'.$currpath.'/'.$d.'?n='.$start.'">';
189-
$r .= '<img title="'.$number_comments.' Kommentare" src="'.$BASE_URI.'/t/'.$currpath.'/'.$d.'?comments='.$number_comments.'" '.$size[3].' class="img'. ($size[0] < $size[1] ? 'h' : 'v') .'" />';
190-
$r .= "</a>\n";
187+
$r .= '<a href="'.$BASE_URI.'/c'.$currpath.$d.'?n='.$start.'">';
188+
$r .= '<img title="'.$number_comments.' Kommentare" src="'.$BASE_URI.'/t'.$currpath.$d.'?comments='.$number_comments.'" '.$size[3].' class="img'. ($size[0] < $size[1] ? 'h' : 'v') .'" />';
189+
$r .= "</a>";
191190
}
192191
$r .= "</div>";
193192

@@ -199,7 +198,7 @@ function show_pictures($path, $currpath) {
199198
if ($start >= $i && $start < $show_to)
200199
$r .= '<b>['. ($i + 1) .'-'. ($show_to) .']</b> ';
201200
else
202-
$r .= '[<a href="'.$BASE_URI.'/p/'.$currpath.'?n='.($i).'">'. ($i + 1) .'-'. ($show_to) .'</a>] ';
201+
$r .= '[<a href="'.$BASE_URI.'/p'.$currpath.'?n='.($i).'">'. ($i + 1) .'-'. ($show_to) .'</a>] ';
203202
}
204203
$r .= '</p>';
205204

index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
if (isset($_SERVER['PATH_INFO'])) {
3535
list(, $galleryId, $action, $path)=explode('/',$_SERVER['PATH_INFO'],4);
3636
} else {
37-
$path='';
37+
$path='/';
3838
$action = '';
3939
$galleryId = 'picview';
4040
}

0 commit comments

Comments
 (0)