/** * 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); }
/** * 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; } }
/** * 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); }
/** * 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; } }