}
break;
case 'export':
- $this->tmpl->show("export.tpl");
+ /* fetch export template */
+ print $this->tmpl->fetch("export.tpl");
+ /* no further execution necessary. */
return;
break;
case 'slideshow':
- $this->tmpl->show("slideshow.tpl");
+ /* fetch slideshow template */
+ print $this->tmpl->show("slideshow.tpl");
+ /* no further execution necessary. */
return;
break;
case 'rss':
$info = getimagesize($orig_path);
/* get EXIF information if JPEG */
- if($info['mime'] == "image/jpeg") {
+ if(isset($info['mime']) && $info['mime'] == "image/jpeg") {
$meta = $this->get_meta_informations($orig_path);
}
$this->tmpl->assign('current_page', $this->getCurrentPage($current, $count));
$this->tmpl->assign('current_img', $photo);
- if($previous_img) {
+ if(isset($previous_img)) {
$this->tmpl->assign('previous_url', "javascript:showPhoto(". $previous_img .");");
$this->tmpl->assign('prev_img', $previous_img);
}
- if($next_img) {
+ if(isset($next_img)) {
$this->tmpl->assign('next_url', "javascript:showPhoto(". $next_img .");");
$this->tmpl->assign('next_img', $next_img);
}
+
$this->tmpl->assign('mini_width', $this->cfg->mini_width);
$this->tmpl->assign('photo_width', $this->cfg->photo_width);
$this->tmpl->assign('photo_number', $i);
public function showPhotoIndex()
{
$photos = $this->getPhotoSelection();
+ $current_tags = $this->getCurrentTags();
$count = count($photos);
$this->tmpl->assign('page_selector', $page_select);
}
- $current_tags = $this->getCurrentTags();
$extern_link = "index.php?mode=showpi";
$rss_link = "index.php?mode=rss";
if($current_tags != "") {
$flip_hori = false;
$flip_vert = false;
- switch($meta['Orientation']) {
- case 1: /* top, left */
- /* nothing to do */ break;
- case 2: /* top, right */
- $rotate = 0; $flip_hori = true; break;
- case 3: /* bottom, left */
- $rotate = 180; break;
- case 4: /* bottom, right */
- $flip_vert = true; break;
- case 5: /* left side, top */
- $rotate = 90; $flip_vert = true; break;
- case 6: /* right side, top */
- $rotate = 90; break;
- case 7: /* left side, bottom */
- $rotate = 270; $flip_vert = true; break;
- case 8: /* right side, bottom */
- $rotate = 270; break;
+ if(isset($meta['Orientation'])) {
+ switch($meta['Orientation']) {
+ case 1: /* top, left */
+ /* nothing to do */ break;
+ case 2: /* top, right */
+ $rotate = 0; $flip_hori = true; break;
+ case 3: /* bottom, left */
+ $rotate = 180; break;
+ case 4: /* bottom, right */
+ $flip_vert = true; break;
+ case 5: /* left side, top */
+ $rotate = 90; $flip_vert = true; break;
+ case 6: /* right side, top */
+ $rotate = 90; break;
+ case 7: /* left side, bottom */
+ $rotate = 270; $flip_vert = true; break;
+ case 8: /* right side, bottom */
+ $rotate = 270; break;
+ }
}
$src_img = @imagecreatefromjpeg($orig_image);
private function _debug($text)
{
- if($this->fromcmd) {
+ if(isset($this->fromcmd)) {
print $text;
}
$orig_path = $this->translate_path($this->parse_uri($details['uri'], 'fullpath'));
/* get EXIF information if JPEG */
- if($details['mime'] == "image/jpeg") {
+ if(isset($details['mime']) && $details['mime'] == "image/jpeg") {
$meta = $this->get_meta_informations($orig_path);
}
/**
- * return all selected tags as one string
+ * get all selected tags
+ *
+ * This function will return all selected tags as one string, seperated
+ * by a comma.
* @return array
*/
private function getCurrentTags()