Catch "photo not found" in view.php
This commit is contained in:
parent
6303adc679
commit
0f8bf0f8e1
@ -195,6 +195,8 @@ build.no_content = function(typ) {
|
|||||||
break;
|
break;
|
||||||
case 'cog': html += '<p>No configuration</p>';
|
case 'cog': html += '<p>No configuration</p>';
|
||||||
break;
|
break;
|
||||||
|
case 'question-mark': html += '<p>Photo not found</p>';
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
@ -81,6 +81,16 @@ loadPhotoInfo = function(photoID) {
|
|||||||
|
|
||||||
api.post('Photo::get', params, function(data) {
|
api.post('Photo::get', params, function(data) {
|
||||||
|
|
||||||
|
if (data==='Warning: Photo private!'||
|
||||||
|
data==='Warning: Wrong password!') {
|
||||||
|
|
||||||
|
$('body').append(build.no_content('question-mark'));
|
||||||
|
$('body').removeClass('view');
|
||||||
|
header.dom().remove();
|
||||||
|
return false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/* Set title */
|
/* Set title */
|
||||||
|
|
||||||
if (!data.title) data.title = 'Untitled';
|
if (!data.title) data.title = 'Untitled';
|
||||||
|
Loading…
Reference in New Issue
Block a user