示例#1
0
    if ($JUMPTO) {
        $NS = getNS($JUMPTO);
    }
}
// handle meta saving
if ($IMG && @array_key_exists('save', $INPUT->arr('do'))) {
    $JUMPTO = media_metasave($IMG, $AUTH, $INPUT->arr('meta'));
}
if ($IMG && ($INPUT->str('mediado') == 'save' || @array_key_exists('save', $INPUT->arr('mediado')))) {
    $JUMPTO = media_metasave($IMG, $AUTH, $INPUT->arr('meta'));
}
if ($INPUT->int('rev') && $conf['mediarevisions']) {
    $REV = $INPUT->int('rev');
}
if ($INPUT->str('mediado') == 'restore' && $conf['mediarevisions']) {
    $JUMPTO = media_restore($INPUT->str('image'), $REV, $AUTH);
}
// handle deletion
if ($DEL) {
    $res = 0;
    if (checkSecurityToken()) {
        $res = media_delete($DEL, $AUTH);
    }
    if ($res & DOKU_MEDIA_DELETED) {
        $msg = sprintf($lang['deletesucc'], noNS($DEL));
        if ($res & DOKU_MEDIA_EMPTY_NS && !$fullscreen) {
            // current namespace was removed. redirecting to root ns passing msg along
            send_redirect(DOKU_URL . 'lib/exe/mediamanager.php?msg1=' . rawurlencode($msg) . '&edid=' . $INPUT->str('edid'));
        }
        msg($msg, 1);
    } elseif ($res & DOKU_MEDIA_INUSE) {
示例#2
0
    if ($JUMPTO) {
        $NS = getNS($JUMPTO);
    }
}
// handle meta saving
if ($IMG && @array_key_exists('save', $_REQUEST['do'])) {
    $JUMPTO = media_metasave($IMG, $AUTH, $_REQUEST['meta']);
}
if ($IMG && ($_REQUEST['mediado'] == 'save' || @array_key_exists('save', $_REQUEST['mediado']))) {
    $JUMPTO = media_metasave($IMG, $AUTH, $_REQUEST['meta']);
}
if ($_REQUEST['rev'] && $conf['mediarevisions']) {
    $REV = (int) $_REQUEST['rev'];
}
if ($_REQUEST['mediado'] == 'restore' && $conf['mediarevisions']) {
    $JUMPTO = media_restore($_REQUEST['image'], $REV, $AUTH);
}
// handle deletion
if ($DEL) {
    $res = 0;
    if (checkSecurityToken()) {
        $res = media_delete($DEL, $AUTH);
    }
    if ($res & DOKU_MEDIA_DELETED) {
        $msg = sprintf($lang['deletesucc'], noNS($DEL));
        if ($res & DOKU_MEDIA_EMPTY_NS && !$fullscreen) {
            // current namespace was removed. redirecting to root ns passing msg along
            send_redirect(DOKU_URL . 'lib/exe/mediamanager.php?msg1=' . rawurlencode($msg) . '&edid=' . $_REQUEST['edid']);
        }
        msg($msg, 1);
    } elseif ($res & DOKU_MEDIA_INUSE) {