]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/action.php
Merge branch 'tos' into 0.8.x
[quix0rs-gnu-social.git] / lib / action.php
index 77a8ee391f3efc77416ceb2205abc9303ea39e57..928eb48c0b383d19adc3501bfb8f967f08d1e977 100644 (file)
@@ -383,15 +383,18 @@ class Action extends HTMLOutputter // lawsuit
     {
         $this->elementStart('address', array('id' => 'site_contact',
                                              'class' => 'vcard'));
-        $this->elementStart('a', array('class' => 'url home bookmark',
-                                       'href' => common_local_url('public')));
-        if (common_config('site', 'logo') || file_exists(theme_file('logo.png'))) {
-            $this->element('img', array('class' => 'logo photo',
-                                        'src' => (common_config('site', 'logo')) ? common_config('site', 'logo') : theme_path('logo.png'),
-                                        'alt' => common_config('site', 'name')));
+        if (Event::handle('StartAddressData', array($this))) {
+            $this->elementStart('a', array('class' => 'url home bookmark',
+                                           'href' => common_local_url('public')));
+            if (common_config('site', 'logo') || file_exists(theme_file('logo.png'))) {
+                $this->element('img', array('class' => 'logo photo',
+                                            'src' => (common_config('site', 'logo')) ? common_config('site', 'logo') : theme_path('logo.png'),
+                                            'alt' => common_config('site', 'name')));
+            }
+            $this->element('span', array('class' => 'fn org'), common_config('site', 'name'));
+            $this->elementEnd('a');
+            Event::handle('EndAddressData', array($this));
         }
-        $this->element('span', array('class' => 'fn org'), common_config('site', 'name'));
-        $this->elementEnd('a');
         $this->elementEnd('address');
     }
 
@@ -421,11 +424,13 @@ class Action extends HTMLOutputter // lawsuit
                     $this->menuItem(common_local_url('smssettings'),
                                     _('Connect'), _('Connect to SMS, Twitter'), false, 'nav_connect');
                 }
-                $this->menuItem(common_local_url('invite'),
-                                _('Invite'),
-                                sprintf(_('Invite friends and colleagues to join you on %s'),
-                                        common_config('site', 'name')),
-                                false, 'nav_invitecontact');
+                if (common_config('invite', 'enabled')) {
+                    $this->menuItem(common_local_url('invite'),
+                                    _('Invite'),
+                                    sprintf(_('Invite friends and colleagues to join you on %s'),
+                                            common_config('site', 'name')),
+                                    false, 'nav_invitecontact');
+                }
                 $this->menuItem(common_local_url('logout'),
                                 _('Logout'), _('Logout from the site'), false, 'nav_logout');
             }
@@ -968,12 +973,16 @@ class Action extends HTMLOutputter // lawsuit
         $action = $this->trimmed('action');
         $args   = $this->args;
         unset($args['action']);
+        if (common_config('site', 'fancy')) {
+            unset($args['p']);
+        }
         if (array_key_exists('submit', $args)) {
             unset($args['submit']);
         }
         foreach (array_keys($_COOKIE) as $cookie) {
             unset($args[$cookie]);
         }
+
         return common_local_url($action, $args);
     }