Esempio n. 1
0
    } else {
        if ($gContent->expunge()) {
            $url = is_object($gGallery) ? $gGallery->getDisplayUrl() : FISHEYE_PKG_URL;
            header("Location: {$url}");
        }
    }
}
$errors = $gContent->mErrors;
$gBitSmarty->assignByRef('errors', $errors);
$gContent->loadParentGalleries();
// Get a list of all existing galleries
$gFisheyeGallery = new FisheyeGallery();
$getHash = array('user_id' => $gBitUser->mUserId);
if ($gContent->mContentId) {
    $getHash['contain_item'] = $gContent->mContentId;
}
// modify listHash according to global preferences
if ($gBitSystem->isFeatureActive('fisheye_show_all_to_admins') && $gBitUser->hasPermission('p_fisheye_admin')) {
    unset($getHash['user_id']);
} elseif ($gBitSystem->isFeatureActive('fisheye_show_public_on_upload')) {
    //	$getHash['show_public'] = TRUE;
}
$galleryTree = $gFisheyeGallery->generateList($getHash, array('name' => "gallery_id", 'id' => "gallerylist", 'item_attributes' => array('class' => 'listingtitle'), 'radio_checkbox' => TRUE), true);
$gBitSmarty->assignByRef('galleryTree', $galleryTree);
$gBitSmarty->assign('requested_gallery', !empty($_REQUEST['gallery_id']) ? $_REQUEST['gallery_id'] : NULL);
$gContent->invokeServices('content_edit_function');
if (!empty($_REQUEST['ajax'])) {
    echo $gBitSmarty->fetch('bitpackage:fisheye/edit_image_inc.tpl', tra('Edit Image: ') . $gContent->getTitle());
} else {
    $gBitSystem->display('bitpackage:fisheye/edit_image.tpl', tra('Edit Image: ') . $gContent->getTitle(), array('display_mode' => 'edit'));
}