added git warning
This commit is contained in:
parent
4c005e3f9a
commit
a4667104ff
|
@ -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
|
||||
*
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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.';
|
Loading…
Reference in New Issue