summaryrefslogtreecommitdiff
path: root/lib/plugins/extension/helper
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2014-01-05 21:22:31 +0100
committerAndreas Gohr <andi@splitbrain.org>2014-01-05 21:22:31 +0100
commita4667104ff9b4131c1aceaea022e65d0976a15d6 (patch)
treed23b6dc8d4840e92e02359820dc474ba6181b2d5 /lib/plugins/extension/helper
parent4c005e3f9adeb9180a879cc38518d1cff63e9261 (diff)
downloadrpg-a4667104ff9b4131c1aceaea022e65d0976a15d6.tar.gz
rpg-a4667104ff9b4131c1aceaea022e65d0976a15d6.tar.bz2
added git warning
Diffstat (limited to 'lib/plugins/extension/helper')
-rw-r--r--lib/plugins/extension/helper/extension.php10
-rw-r--r--lib/plugins/extension/helper/list.php4
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php
index 9cf4848ad..d200d5ab0 100644
--- a/lib/plugins/extension/helper/extension.php
+++ b/lib/plugins/extension/helper/extension.php
@@ -87,6 +87,16 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin {
}
/**
+ * 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
*
* @return bool If the extension is bundled
diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php
index e33dbfa04..901a4e8fa 100644
--- a/lib/plugins/extension/helper/list.php
+++ b/lib/plugins/extension/helper/list.php
@@ -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()) {