From d132646915a3cf500215e7323b29a3e26670be10 Mon Sep 17 00:00:00 2001
From: Thomas Willingham <beardyunixer@beardyunixer.com>
Date: Sat, 11 Oct 2014 15:42:31 +0100
Subject: Unbreak webpages

---
 mod/webpages.php | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

(limited to 'mod')

diff --git a/mod/webpages.php b/mod/webpages.php
index 2c3cc36ea..6fee8b414 100644
--- a/mod/webpages.php
+++ b/mod/webpages.php
@@ -81,9 +81,6 @@ function webpages_content(&$a) {
 	require_once('include/conversation.php');
 	$o = profile_tabs($a,true);
 
-	$o .= '<div class="generic-content-wrapper-styled">';
-
-	$o .= '<h2>' . t('Webpages') . '</h2>';
 
 	$x = array(
 		'webpage' => ITEM_WEBPAGE,
@@ -129,6 +126,7 @@ function webpages_content(&$a) {
 		$url = z_root() . "/editwebpage/" . $which;
 // This isn't pretty, but it works.  Until I figure out what to do with the UI, it's Good Enough(TM).
 	return $o . replace_macros(get_markup_template("webpagelist.tpl"), array(
+    	'$listtitle = t('Webpages'),
 		'$baseurl' => $url,
 		'$edit' => t('Edit'),
 		'$pages' => $pages,
-- 
cgit v1.2.3


From d46fd7917f248c105ca44d2d15878d79b358fdfd Mon Sep 17 00:00:00 2001
From: Thomas Willingham <beardyunixer@beardyunixer.com>
Date: Sat, 11 Oct 2014 16:18:15 +0100
Subject: Fix webpages.  Sycning between too many codebases...

---
 mod/webpages.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'mod')

diff --git a/mod/webpages.php b/mod/webpages.php
index 6fee8b414..f1be648ff 100644
--- a/mod/webpages.php
+++ b/mod/webpages.php
@@ -35,6 +35,8 @@ function webpages_content(&$a) {
 	$ob_hash = (($observer) ? $observer['xchan_hash'] : '');
 
 	$perms = get_all_perms($owner,$ob_hash);
+	if ($which == 'sys' && is_site_admin())
+		$perms['write_pages'] = 1;
 
 	if(! $perms['write_pages']) {
 		notice( t('Permission denied.') . EOL);
@@ -126,7 +128,7 @@ function webpages_content(&$a) {
 		$url = z_root() . "/editwebpage/" . $which;
 // This isn't pretty, but it works.  Until I figure out what to do with the UI, it's Good Enough(TM).
 	return $o . replace_macros(get_markup_template("webpagelist.tpl"), array(
-    	'$listtitle = t('Webpages'),
+    		'$listtitle' => t('Webpages'),
 		'$baseurl' => $url,
 		'$edit' => t('Edit'),
 		'$pages' => $pages,
-- 
cgit v1.2.3


From b84b2d5aa50a58e0ca85d56e02a83bdfbc3d9cde Mon Sep 17 00:00:00 2001
From: Thomas Willingham <beardyunixer@beardyunixer.com>
Date: Sat, 11 Oct 2014 16:19:36 +0100
Subject: FFS, another oops

---
 mod/webpages.php | 2 --
 1 file changed, 2 deletions(-)

(limited to 'mod')

diff --git a/mod/webpages.php b/mod/webpages.php
index f1be648ff..a5cfd00e6 100644
--- a/mod/webpages.php
+++ b/mod/webpages.php
@@ -35,8 +35,6 @@ function webpages_content(&$a) {
 	$ob_hash = (($observer) ? $observer['xchan_hash'] : '');
 
 	$perms = get_all_perms($owner,$ob_hash);
-	if ($which == 'sys' && is_site_admin())
-		$perms['write_pages'] = 1;
 
 	if(! $perms['write_pages']) {
 		notice( t('Permission denied.') . EOL);
-- 
cgit v1.2.3


From 82232c6916ba6a657bbae524ada3c4ba21001156 Mon Sep 17 00:00:00 2001
From: Thomas Willingham <beardyunixer@beardyunixer.com>
Date: Sat, 11 Oct 2014 17:24:58 +0100
Subject: Show tag in siteinfo.  Not useful for us, quite useful for admins.

---
 mod/siteinfo.php | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'mod')

diff --git a/mod/siteinfo.php b/mod/siteinfo.php
index c1d65fadd..a58f17c53 100644
--- a/mod/siteinfo.php
+++ b/mod/siteinfo.php
@@ -88,8 +88,10 @@ function siteinfo_content(&$a) {
 
 	if(! get_config('system','hidden_version_siteinfo')) {
 		$version = sprintf( t('Version %s'), RED_VERSION );
-		if(@is_dir('.git') && function_exists('shell_exec'))
+		if(@is_dir('.git') && function_exists('shell_exec')) {
 			$commit = @shell_exec('git log -1 --format="%h"');
+			$tag = @shell_exec('git describe --tags --abbrev=0');
+		}
 		if(! isset($commit) || strlen($commit) > 16)
 			$commit = '';
 	}
@@ -130,6 +132,7 @@ function siteinfo_content(&$a) {
                 '$title' => t('Red'),
 		'$description' => t('This is a hub of the Red Matrix - a global cooperative network of decentralized privacy enhanced websites.'),
 		'$version' => $version,
+		'$tag' => $tag,
 		'$commit' => $commit,
 		'$web_location' => t('Running at web location') . ' ' . z_root(),
 		'$visit' => t('Please visit <a href="http://getzot.com">GetZot.com</a> to learn more about the Red Matrix.'),
-- 
cgit v1.2.3


From dc4593f5b54112093c94cc2ea39a4f2d138c1432 Mon Sep 17 00:00:00 2001
From: Klaus Weidenbach <Klaus.Weidenbach@gmx.net>
Date: Sun, 12 Oct 2014 00:33:37 +0200
Subject: Moved classes from reddav.php into own files.

Finished moving classes out from include/reddav.php into own files. Also
continued with namespace for RedDAV.
Improved some docs and added some todos and fixmes.
---
 mod/cloud.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'mod')

diff --git a/mod/cloud.php b/mod/cloud.php
index 149a6da5d..a8875fd29 100644
--- a/mod/cloud.php
+++ b/mod/cloud.php
@@ -63,7 +63,7 @@ function cloud_init(&$a) {
 	if ($which)
 		profile_load($a, $which, $profile);
 
-	$auth = new RedBasicAuth();
+	$auth = new RedDAV\RedBasicAuth();
 
 	$ob_hash = get_observer_hash();
 
@@ -91,7 +91,7 @@ function cloud_init(&$a) {
 	$_SERVER['REQUEST_URI'] = strip_zids($_SERVER['REQUEST_URI']);
 	$_SERVER['REQUEST_URI'] = preg_replace('/[\?&]davguest=(.*?)([\?&]|$)/ism', '', $_SERVER['REQUEST_URI']);
 
-	$rootDirectory = new RedDirectory('/', $auth);
+	$rootDirectory = new RedDAV\RedDirectory('/', $auth);
 
 	// A SabreDAV server-object
 	$server = new DAV\Server($rootDirectory);
-- 
cgit v1.2.3


From 5aae5862f285d9340b37abfb3c390c2816692c6d Mon Sep 17 00:00:00 2001
From: Klaus <Klaus.Weidenbach@gmx.net>
Date: Sun, 12 Oct 2014 21:10:04 +0200
Subject: A fix, but I have no case to verify.

I could not find out under which conditions this is relevant and therefore have no test case, but it must be of instance RedDAV\RedFile.
---
 mod/cloud.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'mod')

diff --git a/mod/cloud.php b/mod/cloud.php
index a8875fd29..27724f6b0 100644
--- a/mod/cloud.php
+++ b/mod/cloud.php
@@ -117,7 +117,7 @@ function cloud_init(&$a) {
 	if ((! $auth->observer) && ($_SERVER['REQUEST_METHOD'] === 'GET')) {
 		try { 
 			$x = RedFileData('/' . $a->cmd, $auth);
-			if($x instanceof RedFile)
+			if($x instanceof RedDAV\RedFile)
 				$isapublic_file = true;
 		}
 		catch (Exception $e) {
@@ -150,4 +150,4 @@ function cloud_init(&$a) {
 	$server->exec();
 
 	killme();
-}
\ No newline at end of file
+}
-- 
cgit v1.2.3