summaryrefslogtreecommitdiffstats
path: root/phpfspot.class.php
diff options
context:
space:
mode:
authorAndreas Unterkircher <unki@netshadow.at>2007-07-01 05:32:04 +0000
committerAndreas Unterkircher <unki@netshadow.at>2007-07-01 05:32:04 +0000
commit27bcdc62f97076503c095fce7bae01a38fad7f60 (patch)
tree6edb384bc77534901b62d4978490804241a25144 /phpfspot.class.php
parent4e9f06a190fa64385a099ec0e4d34c6d7568a0ef (diff)
beautify some warning messages
git-svn-id: file:///var/lib/svn/phpfspot/trunk@149 fa6a889d-dae6-447d-9e79-4ba9a3039384
Diffstat (limited to 'phpfspot.class.php')
-rw-r--r--phpfspot.class.php21
1 files changed, 14 insertions, 7 deletions
diff --git a/phpfspot.class.php b/phpfspot.class.php
index 36662fd..4468a5e 100644
--- a/phpfspot.class.php
+++ b/phpfspot.class.php
@@ -138,11 +138,11 @@ class PHPFSPOT {
$thumb_path = $this->cfg->base_path ."/thumbs/". $this->cfg->photo_width ."_". $this->getMD5($photo);
if(!file_exists($orig_path)) {
- print "Photo ". $orig_path ." does not exist!<br />\n";
+ $this->_warning("Photo ". $orig_path ." does not exist!<br />\n");
}
if(!is_readable($orig_path)) {
- print "Photo ". $orig_path ." is not readable for user ". get_current_user() ."<br />\n";
+ $this->_warning("Photo ". $orig_path ." is not readable for user ". get_current_user() ."<br />\n");
}
/* If the thumbnail doesn't exist yet, try to create it */
@@ -172,7 +172,7 @@ class PHPFSPOT {
$this->tmpl->assign('tags', $this->get_photo_tags($photo));
}
else {
- print "Can't open file ". $thumb_path ."\n";
+ $this->_warning("Can't open file ". $thumb_path ."\n");
}
if($previous_img) {
@@ -479,12 +479,12 @@ class PHPFSPOT {
$filesize = rand($filesize/1024, 2);
if(!file_exists($orig_path)) {
- print "Photo ". $orig_path ." does not exist!<br />\n";
+ $this->_warning("Photo ". $orig_path ." does not exist!<br />\n");
return;
}
if(!is_readable($orig_path)) {
- print "Photo ". $orig_path ." is not readable for user ". get_current_user() ."<br />\n";
+ $this->_warning("Photo ". $orig_path ." is not readable for user ". get_current_user() ."<br />\n");
return;
}
@@ -656,12 +656,12 @@ class PHPFSPOT {
$full_path = $this->translate_path($details['directory_path']) ."/". $details['name'];
if(!file_exists($full_path)) {
- print "File ". $full_path ." does not exist\n";
+ $this->_warning("File ". $full_path ." does not exist\n");
return;
}
if(!is_readable($full_path)) {
- print "File ". $full_path ." is not readable for ". get_current_user() ."\n";
+ $this->_warning("File ". $full_path ." is not readable for ". get_current_user() ."\n");
return;
}
@@ -903,6 +903,13 @@ class PHPFSPOT {
} // checkifImageSupported()
+ public function _warning($text)
+ {
+ print "<img src=\"resources/green_info.png\" alt=\"warning\" />\n";
+ print $text;
+
+ } // _warning()
+
}
?>