Here's the fix:
1) In the file ow_plugins/photo/components/page_head.php in the __construct method replace this code :
$this->assign('isAuthenticated', OW::getUser()->isAuthenticated());
$this->assign('canUpload', OW::getUser()->isAuthorized('photo', 'upload') && !OW::getRequest()->isAjax());
with this:
$isAuthenticated = OW::getUser()->isAuthenticated();
$canUpload = !OW::getRequest()->isAjax() && OW::getUser()->isAuthorized('photo', 'upload');
if ( $isAuthenticated && $canUpload )
{
$language->addKeyForJs('photo', 'album_name');
$language->addKeyForJs('photo', 'album_desc');
$language->addKeyForJs('photo', 'create_album');
$language->addKeyForJs('photo', 'newsfeed_album');
$language->addKeyForJs('photo', 'newsfeed_album_error_msg');
$language->addKeyForJs('photo', 'upload_photos');
$language->addKeyForJs('photo', 'close_alert');
}
$this->assign('isAuthenticated', $isAuthenticated);
$this->assign('canUpload', $canUpload);
2) in ow_plugins/photo/views/components/page_head.html replace this code :
which starts with this line
{if $isAuthenticated && !empty($canUpload)}
and end with this :
{decorator name="button" class="ow_ic_add" id="btn-add-new-photo" langLabel="photo+upload_photos" onclick="{$url}();"}
{/if}
replace with this code
{if $isAuthenticated && !empty($canUpload)}
{decorator name="button" class="ow_ic_add" id="add-new-photo-album" langLabel="photo+create_album"}
{script}
jQuery(function()
{
var content = $(document.getElementById('add-new-photo-album-content'));
var albumName = new OwTextField('add-new-photo-album-name', 'add-new-photo-album-name', OW.getLanguageText('photo', 'album_name'));
var albumDesc = new OwTextArea('add-new-photo-album-desc', 'add-new-photo-album-desc', OW.getLanguageText('photo', 'album_desc'));
$('#add-new-photo-album').on('click', function()
{
var fb = new OW_FloatBox(
{
$title: OW.getLanguageText('photo', 'create_album'),
$contents: content,
width: 500
});
fb.bind('show', function()
{
$('input.ow_ic_submit', content).off().on('click', function()
{
var value = albumName.getValue().trim();
if ( value.length === 0 )
{
$('span.ow_error', content).show();
$(albumName.input).focus();
return;
}
else if ( value === OW.getLanguageText('photo', 'newsfeed_album') )
{
OW.error(OW.getLanguageText('photo', 'newsfeed_album_error_msg'));
$('span.ow_error', content).show();
$(albumName.input).focus();
return;
}
fb.close();
var ajaxUploadPhotoFB = OW.ajaxFloatBox("PHOTO_CMP_AjaxUpload", [0, albumName.getValue(), albumDesc.getValue()], {
title: OW.getLanguageText('photo', 'upload_photos'),
width: "746px"
});
ajaxUploadPhotoFB.bind("close", function()
{
if ( ajaxPhotoUploader.isHasData() )
{
return confirm(OW.getLanguageText('photo', 'close_alert'));
}
});
});
});
fb.bind('close', function()
{
$('span.ow_error', content).hide();
});
});
});
{/script}
{decorator name="button" class="ow_ic_add" id="btn-add-new-photo" langLabel="photo+upload_photos" onclick="{$url}();"}
{/if}
Then enable dev mode and refresh the page, then disable dev mode.
In 1.7.2 this issue is fixed