Ejemplo n.º 1
0
/**
 * Returns image diff representation for mediamanager
 * @author Kate Arzamastseva <*****@*****.**>
 */
function ajax_mediadiff()
{
    global $NS;
    global $INPUT;
    if ($INPUT->has('image')) {
        $image = cleanID($INPUT->str('image'));
    }
    $NS = $INPUT->post->str('ns');
    $auth = auth_quickaclcheck("{$NS}:*");
    media_diff($image, $NS, $auth, true);
}
Ejemplo n.º 2
0
/**
 * Prints tab that displays mediafile revisions
 *
 * @author Kate Arzamastseva <*****@*****.**>
 */
function media_tab_history($image, $ns, $auth = null)
{
    global $lang;
    global $INPUT;
    if (is_null($auth)) {
        $auth = auth_quickaclcheck("{$ns}:*");
    }
    $do = $INPUT->str('mediado');
    if ($auth >= AUTH_READ && $image) {
        if ($do == 'diff') {
            media_diff($image, $ns, $auth);
        } else {
            $first = $INPUT->int('first');
            html_revisions($first, $image);
        }
    } else {
        echo '<div class="nothing">' . $lang['media_perm_read'] . '</div>' . NL;
    }
}
Ejemplo n.º 3
0
/**
 * Returns image diff representation for mediamanager
 * @author Kate Arzamastseva <*****@*****.**>
 */
function ajax_mediadiff()
{
    global $NS;
    if ($_REQUEST['image']) {
        $image = cleanID($_REQUEST['image']);
    }
    $NS = $_POST['ns'];
    $auth = auth_quickaclcheck("{$ns}:*");
    media_diff($image, $NS, $auth, true);
}
Ejemplo n.º 4
0
/**
 * Prints tab that displays mediafile revisions
 *
 * @author Kate Arzamastseva <*****@*****.**>
 */
function media_tab_history($image, $ns, $auth = null)
{
    global $lang;
    if (is_null($auth)) {
        $auth = auth_quickaclcheck("{$ns}:*");
    }
    $do = $_REQUEST['mediado'];
    if ($auth >= AUTH_READ && $image) {
        if ($do == 'diff') {
            media_diff($image, $ns, $auth);
        } else {
            $first = isset($_REQUEST['first']) ? intval($_REQUEST['first']) : 0;
            html_revisions($first, $image);
        }
    } else {
        echo '<div class="nothing">' . $lang['media_perm_read'] . '</div>' . NL;
    }
}