added git warning

This commit is contained in:
Andreas Gohr 2014-01-05 21:22:31 +01:00
parent 4c005e3f9a
commit a4667104ff
3 changed files with 17 additions and 1 deletions

View File

@ -86,6 +86,16 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin {
return is_dir($this->getInstallDir());
}
/**
* If the extension is under git control
*
* @return bool
*/
public function isGitControlled() {
if(!$this->isInstalled()) return false;
return is_dir($this->getInstallDir().'/.git');
}
/**
* If the extension is bundled
*

View File

@ -476,6 +476,10 @@ class helper_plugin_extension_list extends DokuWiki_Plugin {
}
}
if ($extension->isGitControlled()){
$errors .= '<p class="permerror">'.$this->getLang('git').'</p>';
}
}else{
if (($canmod = $extension->canModify()) === true) {
if ($extension->getDownloadURL()) {

View File

@ -80,4 +80,6 @@ $lang['error_copy'] = 'There was a file copy error while attem
$lang['noperms'] = 'Extension directory is not writable';
$lang['notplperms'] = 'Template directory is not writable';
$lang['nopluginperms'] = 'Plugin directory is not writable';
$lang['nopluginperms'] = 'Plugin directory is not writable';
$lang['git'] = 'This extension was installed via git, you may not want to update it here.';