diff --git a/backend.php b/backend.php index 98b76450f..41481a963 100644 --- a/backend.php +++ b/backend.php @@ -47,7 +47,7 @@ startup_gettext(); - $script_started = getmicrotime(); + $script_started = microtime(true); $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME); diff --git a/classes/backend.php b/classes/backend.php index 0b6e6bd30..d9a7a9fec 100644 --- a/classes/backend.php +++ b/classes/backend.php @@ -23,16 +23,10 @@ class Backend extends Handler { $imap = get_hotkeys_map($this->link); $omap = array(); - // :( - $tinycharmap = array( - "(9)" => "{TAB}", - "(191)" => "?"); - foreach ($imap[1] as $sequence => $action) { - if (!isset($omap[$action])) { - $omap[$action] = isset($tinycharmap[$sequence]) ? $tinycharmap[$sequence] : - $sequence; - } + if (!isset($omap[$action])) $omap[$action] = array(); + + array_push($omap[$action], $sequence); } print ""; diff --git a/classes/feeds.php b/classes/feeds.php index de001d568..886470e90 100644 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -152,7 +152,7 @@ class Feeds extends Handler_Protected { $reply = array(); - $timing_info = getmicrotime(); + $timing_info = microtime(true); $topmost_article_ids = array(); @@ -750,7 +750,7 @@ class Feeds extends Handler_Protected { } function view() { - $timing_info = getmicrotime(); + $timing_info = microtime(true); $reply = array(); diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php index da8d68ba1..2ed7b1b24 100644 --- a/classes/pref/feeds.php +++ b/classes/pref/feeds.php @@ -437,6 +437,8 @@ class Pref_Feeds extends Handler_Protected { } function uploadicon() { + header("Content-type: text/html"); + $icon_file = $_FILES['icon_file']['tmp_name']; $feed_id = db_escape_string($_REQUEST["feed_id"]); diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php index eb84bde99..810b1e164 100644 --- a/classes/pref/prefs.php +++ b/classes/pref/prefs.php @@ -824,7 +824,10 @@ class Pref_Prefs extends Handler_Protected { } function setplugins() { - $plugins = join(",", $_REQUEST["plugins"]); + if (is_array($_REQUEST["plugins"])) + $plugins = join(",", $_REQUEST["plugins"]); + else + $plugins = ""; set_pref($this->link, "_ENABLED_PLUGINS", $plugins); } diff --git a/include/functions.php b/include/functions.php index d6c73343e..8db72f56d 100644 --- a/include/functions.php +++ b/include/functions.php @@ -478,11 +478,6 @@ print ""; } - function getmicrotime() { - list($usec, $sec) = explode(" ",microtime()); - return ((float)$usec + (float)$sec); - } - function print_radio($id, $default, $true_is, $values, $attributes = "") { foreach ($values as $v) { @@ -1864,6 +1859,8 @@ "prev_feed" => __("Open previous feed"), "next_article" => __("Open next article"), "prev_article" => __("Open previous article"), + "next_article_noscroll" => __("Open next article (don't scroll long articles)"), + "prev_article_noscroll" => __("Open previous article (don't scroll long articles)"), "search_dialog" => __("Show search dialog")), __("Article") => array( "toggle_mark" => __("Toggle starred"), @@ -1924,6 +1921,8 @@ "p" => "prev_article", "(38)|up" => "prev_article", "(40)|down" => "next_article", + "^(38)|Ctrl-up" => "prev_article_noscroll", + "^(40)|Ctrl-down" => "next_article_noscroll", "(191)|/" => "search_dialog", // "article" => array( "s" => "toggle_mark", @@ -2796,7 +2795,7 @@ $id = 'AUDIO-' . uniqid(); - $entry .= "