]> git.wh0rd.org Git - tt-rss.git/commitdiff
rss: force language to 2 characters; run house keeping hooks properly
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 2 Aug 2013 10:47:34 +0000 (14:47 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 2 Aug 2013 10:47:34 +0000 (14:47 +0400)
include/rssfuncs.php

index e6866182bb329c3445f14f17c41c32b5b603629e..65855754b95342e0db1de6f6798c7a16511285c2 100644 (file)
 
                                if (count($entry_language) > 0) {
                                        $entry_language = array_keys($entry_language);
-                                       $entry_language = db_escape_string($entry_language[0]);
+                                       $entry_language = db_escape_string(substr($entry_language[0], 0, 2));
 
                                        _debug("detected language: $entry_language", $debug_enabled);
                                }
 
                _debug("Cleaned $rc cached tags.");
 
-               foreach ($pluginhost->get_hooks(PluginHost::HOOK_HOUSE_KEEPING) as $plugin) {
-                       $plugin->hook_house_keeping();
-               }
+               PluginHost::getInstance()->run_hooks(PluginHost::HOOK_HOUSE_KEEPING, "hook_house_keeping", "");
 
        }
 ?>