diff --git a/inc/functions.php b/inc/functions.php index 3cf2366..403037f 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -561,3 +561,7 @@ function getEmbed($url) { return array('', array()); } + +function installedViaGit() { + return is_dir('.git'); +} diff --git a/inc/html.php b/inc/html.php index befa1db..25bd102 100644 --- a/inc/html.php +++ b/inc/html.php @@ -508,7 +508,8 @@ function adminBar() { if (!$loggedin) { return $return; } - return '[Status] [' . (($isadmin) ? 'Bans] [' : '') . 'Moderate Post] [Raw Post] [' . (($isadmin) ? 'Rebuild All] [' : '') . (($isadmin && TINYIB_DBMIGRATE) ? 'Migrate Database] [' : '') . 'Log Out] · ' . $return; + + return '[Status] [' . (($isadmin) ? 'Bans] [' : '') . 'Moderate Post] [Raw Post] [' . (($isadmin) ? 'Rebuild All] [' : '') . (($isadmin && installedViaGit()) ? 'Update] [' : '') . (($isadmin && TINYIB_DBMIGRATE) ? 'Migrate Database] [' : '') . 'Log Out] · ' . $return; } function managePage($text, $onload = '') { @@ -832,19 +833,6 @@ EOF; $info -EOF; - if ($isadmin) { - $output .= << -
- - - -
- -EOF; - } - $output .= <<