+

Move plugin file in subdirectory with valid name for deploying

Benjamin Renard [2013-08-21 17:25:21]
Move plugin file in subdirectory with valid name for deploying
Filename
main.php
projectinfos/main.php
projectinfos/templates/summary.php
templates/summary.php
diff --git a/main.php b/main.php
deleted file mode 100644
index f85f309..0000000
--- a/main.php
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
-/**
- * Project infos plugin for ViewGit.
- *
- * This add project infos on summary page.
- *
- * @author Benjamin Renard <brenard@easter-eggs.com>
- */
-class ProjectInfosPlugin extends VGPlugin
-{
-	function __construct() {
-		$this->register_hook('summary');
-	}
-
-	function hook_summary() {
-		global $page;
-		$page['project_infos']=get_project_info($page['project']);
-		if (isset($page['project_infos']['url']) && !is_array($page['project_infos']['url'])) {
-			$page['project_infos']['url']=array($page['project_infos']['url']);
-		}
-		$this->display_plugin_template('summary', FALSE);
-	}
-
-	function hook($type) {
-		global $conf;
-
-		if ($type == 'summary') {
-			$this -> hook_summary();
-		}
-	}
-}
diff --git a/projectinfos/main.php b/projectinfos/main.php
new file mode 100644
index 0000000..f85f309
--- /dev/null
+++ b/projectinfos/main.php
@@ -0,0 +1,31 @@
+<?php
+/**
+ * Project infos plugin for ViewGit.
+ *
+ * This add project infos on summary page.
+ *
+ * @author Benjamin Renard <brenard@easter-eggs.com>
+ */
+class ProjectInfosPlugin extends VGPlugin
+{
+	function __construct() {
+		$this->register_hook('summary');
+	}
+
+	function hook_summary() {
+		global $page;
+		$page['project_infos']=get_project_info($page['project']);
+		if (isset($page['project_infos']['url']) && !is_array($page['project_infos']['url'])) {
+			$page['project_infos']['url']=array($page['project_infos']['url']);
+		}
+		$this->display_plugin_template('summary', FALSE);
+	}
+
+	function hook($type) {
+		global $conf;
+
+		if ($type == 'summary') {
+			$this -> hook_summary();
+		}
+	}
+}
diff --git a/projectinfos/templates/summary.php b/projectinfos/templates/summary.php
new file mode 100644
index 0000000..ecba52a
--- /dev/null
+++ b/projectinfos/templates/summary.php
@@ -0,0 +1,47 @@
+<?php
+global $page;
+?>
+<style>
+dl.projectinfos {
+	margin:		0;
+	padding:	0;
+}
+
+dl.projectinfos dt {
+	position:		relative;
+	width:			7em;
+	left:			0.2em;
+	font-weight:		bold;
+}
+
+dl.projectinfos dd {
+	margin-left:		7em;
+	margin-top:		-1.3em;
+	padding:		0;
+}
+
+dl.projectinfos ul {
+	list-style-type:	none;
+	margin:			0;
+	padding:		0;
+}
+</style>
+<h1 class='projectinfos'>Project informations</h1>
+<dl class='projectinfos'>
+<dt>Description</dt>
+<dd><?php echo $page['project_infos']['description']; ?></dd>
+
+<dt>Last Change</dt>
+<dd><?php echo $page['project_infos']['head_datetime']; ?></dd>
+
+<?php
+if (isset($page['project_infos']['url'])) {
+	echo "<dt>URL</dt>
+	<dd><ul>";
+	foreach ($page['project_infos']['url'] as $url) {
+		echo "<li>$url</li>";
+	}
+	echo "</ul></dd>";
+}
+?>
+</dl>
diff --git a/templates/summary.php b/templates/summary.php
deleted file mode 100644
index ecba52a..0000000
--- a/templates/summary.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-global $page;
-?>
-<style>
-dl.projectinfos {
-	margin:		0;
-	padding:	0;
-}
-
-dl.projectinfos dt {
-	position:		relative;
-	width:			7em;
-	left:			0.2em;
-	font-weight:		bold;
-}
-
-dl.projectinfos dd {
-	margin-left:		7em;
-	margin-top:		-1.3em;
-	padding:		0;
-}
-
-dl.projectinfos ul {
-	list-style-type:	none;
-	margin:			0;
-	padding:		0;
-}
-</style>
-<h1 class='projectinfos'>Project informations</h1>
-<dl class='projectinfos'>
-<dt>Description</dt>
-<dd><?php echo $page['project_infos']['description']; ?></dd>
-
-<dt>Last Change</dt>
-<dd><?php echo $page['project_infos']['head_datetime']; ?></dd>
-
-<?php
-if (isset($page['project_infos']['url'])) {
-	echo "<dt>URL</dt>
-	<dd><ul>";
-	foreach ($page['project_infos']['url'] as $url) {
-		echo "<li>$url</li>";
-	}
-	echo "</ul></dd>";
-}
-?>
-</dl>
ViewGit