diff options
Diffstat (limited to 'mod.php')
| -rw-r--r-- | mod.php | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -272,6 +272,20 @@ if($mod['type'] != ADMIN) error($config['error']['noaccess']); + if(is_dir('.git')) { + // use git instead + + $body = '<div class="ban"><h2>git pull</h2>'; + $body .= '<p>' . str_replace("\n", '<br/>', shell_exec('git pull')) . '</p>'; + $body .= '</div>'; + echo Element('page.html', Array( + 'config' => $config, + 'title' => 'Upgraded', + 'body' => $body + )); + exit; + } + if(!extension_loaded('curl')) error('You need the cURL PHP extension to do that.'); |
