diff options
author | friendica <info@friendica.com> | 2013-09-02 13:31:59 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-09-02 13:31:59 -0700 |
commit | f44274bfca6137795ee878a076d5aeed0b330f64 (patch) | |
tree | 309b0b7067e9733331562fb46baf16d8bb43bf8d /include/text.php | |
parent | 8b7757e033c4483da24700722c186057bb431164 (diff) | |
download | volse-hubzilla-f44274bfca6137795ee878a076d5aeed0b330f64.tar.gz volse-hubzilla-f44274bfca6137795ee878a076d5aeed0b330f64.tar.bz2 volse-hubzilla-f44274bfca6137795ee878a076d5aeed0b330f64.zip |
allow a channel owner to define a default mimetype on webpages (otherwise default to "choose") - also fix the selector w/r/t php code. There is no ui for setting either at the moment, but for instance with wiki pages we probably don't want to have multiple choice of the mimetype. Keep it simple.
Diffstat (limited to 'include/text.php')
-rwxr-xr-x | include/text.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/text.php b/include/text.php index 606ef421c..71374f1f9 100755 --- a/include/text.php +++ b/include/text.php @@ -1329,14 +1329,15 @@ function mimetype_select($channel_id, $current = 'text/bbcode') { 'text/plain' ); - $r = q("select account_flags from account left join channel on account_id = channel_account_id where + $r = q("select account_id, account_roles from account left join channel on account_id = channel_account_id where channel_id = %d limit 1", intval($channel_id) ); if($r) { if($r[0]['account_roles'] & ACCOUNT_ROLE_ALLOWCODE) { - $x[] = 'application/x-php'; + if(local_user() && get_account_id() == $r[0]['account_id']) + $x[] = 'application/x-php'; } } |