Merge branch 'master' of /git/disclosr
Merge branch 'master' of /git/disclosr


Former-commit-id: 9fbbad67fbd89b844e133a0d8f8e7dc4c529d0f7

file:a/about.php -> file:b/about.php
--- a/about.php
+++ b/about.php
@@ -7,10 +7,9 @@
     <h4 class="subheader">Lorem ipsum.</h4>
 </div>
 <h2> What is this? </h2>
-Disclosr is a project to monitor Australian Federal Government agencies 
+Disclo.gs is a project to monitor Australian Federal Government agencies 
 compliance with their <a href="http://www.oaic.gov.au/publications/other_operational/foi_policy_frequently_asked_questions.html#_Toc291837571">"proactive disclosure requirements"</a>.
-OGRE (Open Government Realization Evaluation) is a ranking of compliance with these requirements.
-Prometheus is the agent which polls agency websites to assess compliance.
+
 
 <h2> Open everything </h2>
 All documents released CC-BY 3 AU

--- /dev/null
+++ b/admin/conflicts.php
@@ -1,1 +1,48 @@
+<?php
 
+include_once('../include/common.inc.php');
+include_header();
+                require_once '../lib/php-diff/lib/Diff.php';
+                require_once '../lib/php-diff/lib/Diff/Renderer/Html/SideBySide.php';
+
+$db = $server->get_db('disclosr-agencies');
+
+try {
+    $rows = $db->get_view("app", "getConflicts", null, true)->rows;
+    //print_r($rows);
+    foreach ($rows as $row) {
+echo "<h2>".$row->id."</h2>";
+$request = Requests::get($serverAddr."disclosr-agencies/".$row->id);
+$origSort = object_to_array(json_decode($request->body));
+ksort($origSort);
+    $origDoc = explode(",",json_encode($origSort));
+	foreach($row->value as $conflictRev) {
+$conflictURL = $serverAddr."disclosr-agencies/".$row->id."?rev=".$conflictRev;
+$request = Requests::get($conflictURL);
+$conflictSort = object_to_array(json_decode($request->body));
+ksort($conflictSort);
+    $conflictDoc = explode(",",json_encode($conflictSort));
+echo "curl -X DELETE ".$conflictURL."<br>".PHP_EOL;
+                // Options for generating the diff
+                $options = array(
+                        //'ignoreWhitespace' => true,
+                        //'ignoreCase' => true,
+                );
+
+                // Initialize the diff class
+                $diff = new Diff($conflictDoc, $origDoc, $options);
+
+                // Generate a side by side diff
+                $renderer = new Diff_Renderer_Html_SideBySide;
+                echo $diff->Render($renderer);
+}
+die();
+	
+    }
+} catch (SetteeRestClientException $e) {
+    setteErrorHandler($e);
+}
+
+include_footer();
+?>
+

--- a/getAgency.php
+++ b/getAgency.php
@@ -137,7 +137,7 @@
         }
     }
 
-    $mode = "edit";
+    $mode = "view";
     $rowArray = object_to_array($obj);
 ksort($rowArray);
     if ($mode == "edit") {

file:b/index.php (new)
--- /dev/null
+++ b/index.php
@@ -1,1 +1,9 @@
+<?php
+/* Redirect to a different page in the current directory that was requested */
+$host  = $_SERVER['HTTP_HOST'];
+$uri   = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
+$extra = 'getAgency.php';
+header("Location: http://$host$uri/$extra");
+exit;
+?>