summaryrefslogtreecommitdiff
path: root/inc/functions.php
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2013-07-31 14:54:20 -0400
committerczaks <marcin@6irc.net>2013-07-31 14:54:20 -0400
commit55c7146d884005f70d15e991a9e8ea31b7021361 (patch)
tree57b6548601dfd1542febe05375efe49d439e1fb4 /inc/functions.php
parentee23ec1e24bb2a0cec24af011012e95652ce85a9 (diff)
parent8e4c493a4c5bbff07483fd4a11c44c687c99e441 (diff)
Merge branch 'master' of https://github.com/savetheinternet/Tinyboard
Conflicts: inc/config.php inc/display.php inc/functions.php inc/image.php js/expand.js js/hide-threads.js js/local-time.js js/smartphone-spoiler.js templates/header.html templates/index.html templates/main.js templates/page.html templates/post_reply.html templates/post_thread.html templates/thread.html
Diffstat (limited to 'inc/functions.php')
-rw-r--r--inc/functions.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/inc/functions.php b/inc/functions.php
index 42cdb660..8d1ae920 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -1311,6 +1311,13 @@ function buildJavascript() {
'config' => $config,
'stylesheets' => $stylesheets
));
+
+ // Check if we have translation for the javascripts; if yes, we add it to additional javascripts
+ list($pure_locale) = explode(".", $config['locale']);
+ if (file_exists ($jsloc = "inc/locale/$pure_locale/LC_MESSAGES/javascript.js")) {
+ $script = file_get_contents($jsloc) . "\n\n" . $script;
+ }
+
if ($config['additional_javascript_compile']) {
foreach ($config['additional_javascript'] as $file) {
$script .= file_get_contents($file);
@@ -1415,7 +1422,7 @@ function markup_url($matches) {
$markup_urls[] = $url;
- return '<a target="_blank" rel="nofollow" href="'. $config['url_ads'] . $url . '">' . $url . '</a>' . $after;
+ return '<a target="_blank" rel="nofollow" href="'. $config['link_prefix'] . $url . '">' . $url . '</a>' . $after;
}
function unicodify($body) {