diff --git a/imgboard.php b/imgboard.php index 116fb0d..bab9525 100644 --- a/imgboard.php +++ b/imgboard.php @@ -237,6 +237,19 @@ if (isset($_POST['message']) || isset($_POST['file'])) { $onload = manageOnLoad('bans'); $text .= manageBanForm(); $text .= manageBansTable(); + } else if (isset($_GET['update'])) { + if (is_dir('.git')) { + $git_output = shell_exec('git pull 2>&1'); + $text .= '
++Attempting update...' . "\n\n" . $git_output . '+
Note: If TinyIB updates and you have made custom modifications, review the changes which have been merged into your installation. + Ensure that your modifications do not interfere with any new/modified files. + See the README for more information.
'; + } else { + $text .= 'TinyIB was not installed via Git.
+If you installed TinyIB without Git, you must update manually. If you did install with Git, ensure the script has read and write access to the .git folder.
'; + } } } diff --git a/inc/html.php b/inc/html.php index 3c5c659..cb6c333 100644 --- a/inc/html.php +++ b/inc/html.php @@ -561,7 +561,7 @@ function manageStatus() { $i = 0; foreach ($posts as $post) { if ($post_html != '') { $post_html .= '+ $info + | +EOF; + if ($isadmin) { + $output .= <<