moved replacelink_macro() to Image

This commit is contained in:
Robert Gaggl 2004-03-22 19:05:27 +00:00
parent 7e98da73b2
commit 2de21beba1

View file

@ -56,30 +56,3 @@ function topicchooser_macro(param) {
Html.dropDown({name: "addToTopic"}, options, selected, param.firstOption);
return;
}
/**
* render a link to delete action
* calls image.deletelink_macro, but only
* if the layout in path is the one this image
* belongs to
*/
function replacelink_macro(param) {
if (this.layout && path.Layout != this.layout) {
if (session.user) {
try {
path.Layout.images.checkAdd(session.user, req.data.memberlevel);
} catch (deny) {
return;
}
Html.openLink({href: path.Layout.images.href("create") + "?alias=" + this.alias});
if (param.image && this.site.images.get(param.image))
this.site.renderImage(this.site.images.get(param.image), param);
else
res.write(param.text ? param.text : getMessage("generic.replace"));
Html.closeLink();
}
return;
}
return;
}