summaryrefslogtreecommitdiff
path: root/inc/media.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2014-09-29 20:17:39 +0200
committerAndreas Gohr <andi@splitbrain.org>2014-09-29 20:17:39 +0200
commit6c1ae996157551dcf5bb4e7e8922677bb3d3d358 (patch)
treeb3a4162367176a4e2ebadbd6ab31753c1b042be0 /inc/media.php
parent35f3340eb3b989194a496861abfb5b3d3c9a630d (diff)
parent57271d078b9c433bec79d75cb44dadcafeae07df (diff)
downloadrpg-6c1ae996157551dcf5bb4e7e8922677bb3d3d358.tar.gz
rpg-6c1ae996157551dcf5bb4e7e8922677bb3d3d358.tar.bz2
Merge branch 'master' into stable
* master: (214 commits) release preparations postgresql auth plugin: correct function name parse AT parameter: first strtotime then timestamp remove config option move more strings to lang.php move strings to lang.php add placeholders for create page text phpdocs parserutils improve some scrutinizer issues visibility plugin methods use config cascade for loading of localizations reformatting config cascade add lang files to cascading work around missing gzopen on certain systems #865 translation update fix scrutinizer issues fixed typos in docblock comments do not allow empty passwords clean user credentials from control chars added filter method to INPUT class translation update ...
Diffstat (limited to 'inc/media.php')
-rw-r--r--inc/media.php17
1 files changed, 12 insertions, 5 deletions
diff --git a/inc/media.php b/inc/media.php
index b5347d145..5190862d7 100644
--- a/inc/media.php
+++ b/inc/media.php
@@ -203,7 +203,7 @@ define('DOKU_MEDIA_EMPTY_NS', 8);
*
* @author Andreas Gohr <andi@splitbrain.org>
* @param string $id media id
- * @param int $auth current auth check result
+ * @param int $auth no longer used
* @return int One of: 0,
* DOKU_MEDIA_DELETED,
* DOKU_MEDIA_DELETED | DOKU_MEDIA_EMPTY_NS,
@@ -212,6 +212,7 @@ define('DOKU_MEDIA_EMPTY_NS', 8);
*/
function media_delete($id,$auth){
global $lang;
+ $auth = auth_quickaclcheck(ltrim(getNS($id).':*', ':'));
if($auth < AUTH_DELETE) return DOKU_MEDIA_NOT_AUTH;
if(media_inuse($id)) return DOKU_MEDIA_INUSE;
@@ -581,6 +582,12 @@ function media_notify($id,$file,$mime,$old_rev=false){
/**
* List all files in a given Media namespace
+ *
+ * @param string $ns namespace
+ * @param null|int $auth permission level
+ * @param string $jump
+ * @param bool $fullscreenview
+ * @param bool|string $sort sorting, false skips sorting
*/
function media_filelist($ns,$auth=null,$jump='',$fullscreenview=false,$sort=false){
global $conf;
@@ -1042,7 +1049,7 @@ function media_details($image, $auth, $rev=false, $meta=false) {
foreach($tags as $tag){
if ($tag['value']) {
$value = cleanText($tag['value']);
- echo '<dt>'.$lang[$tag['tag'][1]].':</dt><dd>';
+ echo '<dt>'.$lang[$tag['tag'][1]].'</dt><dd>';
if ($tag['tag'][2] == 'date') echo dformat($value);
else echo hsc($value);
echo '</dd>'.NL;
@@ -1225,7 +1232,7 @@ function media_file_diff($image, $l_rev, $r_rev, $ns, $auth, $fromajax){
foreach($tags as $tag){
$value = cleanText($tag['value']);
if (!$value) $value = '-';
- echo '<dt>'.$lang[$tag['tag'][1]].':</dt>';
+ echo '<dt>'.$lang[$tag['tag'][1]].'</dt>';
echo '<dd>';
if ($tag['highlighted']) {
echo '<strong>';
@@ -1654,10 +1661,10 @@ function media_uploadform($ns, $auth, $fullscreen = false){
$form->addElement(formSecurityToken());
$form->addHidden('ns', hsc($ns));
$form->addElement(form_makeOpenTag('p'));
- $form->addElement(form_makeFileField('upload', $lang['txt_upload'].':', 'upload__file'));
+ $form->addElement(form_makeFileField('upload', $lang['txt_upload'], 'upload__file'));
$form->addElement(form_makeCloseTag('p'));
$form->addElement(form_makeOpenTag('p'));
- $form->addElement(form_makeTextField('mediaid', noNS($id), $lang['txt_filename'].':', 'upload__name'));
+ $form->addElement(form_makeTextField('mediaid', noNS($id), $lang['txt_filename'], 'upload__name'));
$form->addElement(form_makeButton('submit', '', $lang['btn_upload']));
$form->addElement(form_makeCloseTag('p'));