progress: disable submit button while posting
[minimedit.git] / upload.inc.php
index 74219ed0043c01e77a3db61026e5c09dc0fe1036..f79600f892de3ee018377e1ab9adf460b3ce3646 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+$Page->api = $_SERVER['HTTP_ACCEPT'] == 'text/plain';
+
 function userupload($input, $target = NULL, $filename = NULL)
 {
        switch ($input['error']) {
@@ -45,7 +47,7 @@ function messagehtml($input)
        if (empty($input)) {
                return;
        }
-       if ($User and $User->admin and preg_match('/\A<[a-z][^>]*>/', $input)) {
+       if ($User->admin and preg_match('/\A<[a-z][^>]*>/', $input)) {
                return $input;  # allow html input as is if privileged
        }
        $html = preg_replace(