]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/action.php
Only load json2.js if native JSON is not supported
[quix0rs-gnu-social.git] / lib / action.php
index cc4f4aad074b910399ac84133cc993621dcb5e5a..cd84662c9623a187f15f921c8f6923586afe5983 100644 (file)
@@ -249,7 +249,7 @@ class Action extends HTMLOutputter // lawsuit
                 $this->script('jquery.min.js');
                 $this->script('jquery.form.js');
                 $this->script('jquery.cookie.js');
-                $this->script('json2.js');
+                $this->inlineScript('if (typeof window.JSON !== "object") { $.getScript("'.common_path('js/json2.js').'"); }');
                 $this->script('jquery.joverlay.min.js');
                 Event::handle('EndShowJQueryScripts', array($this));
             }
@@ -405,6 +405,7 @@ class Action extends HTMLOutputter // lawsuit
                                             'src' => (common_config('site', 'logo')) ? common_config('site', 'logo') : Theme::path('logo.png'),
                                             'alt' => common_config('site', 'name')));
             }
+            $this->text(' ');
             $this->element('span', array('class' => 'fn org'), common_config('site', 'name'));
             $this->elementEnd('a');
             Event::handle('EndAddressData', array($this));
@@ -822,12 +823,14 @@ class Action extends HTMLOutputter // lawsuit
                                             'alt' => common_config('license', 'title'),
                                             'width' => '80',
                                             'height' => '15'));
+                $this->text(' ');
                 //TODO: This is dirty: i18n
                 $this->text(_('All '.common_config('site', 'name').' content and data are available under the '));
                 $this->element('a', array('class' => 'license',
                                           'rel' => 'external license',
                                           'href' => common_config('license', 'url')),
                                common_config('license', 'title'));
+                $this->text(' ');
                 $this->text(_('license.'));
                 $this->elementEnd('p');
                 break;