diff --git a/htdocs/setup.php b/htdocs/setup.php index 77cb752a..a66735b7 100644 --- a/htdocs/setup.php +++ b/htdocs/setup.php @@ -7,11 +7,90 @@ $session->LoginRequired(); include("interactive-page.php"); include("page-header.php"); +/** @TODO: work out something more than true/false returns for dependency checks */ +function check_pdo() { + return class_exists('PDO'); +} + +function check_pgsql() { + return function_exists('pg_connect'); +} + +function check_schema_version() { + global $c; + if ( $c->want_dbversion[0] == $c->schema_major + && $c->want_dbversion[1] == $c->schema_minor + && $c->want_dbversion[2] == $c->schema_patch ) { + return true; + } + return false; +} + +$dependencies = array( + 'DAViCal DB Schema version '. implode('.',$c->want_dbversion) => 'check_schema_version', + 'PHP PDO module available' => 'check_pdo', + 'PHP PostgreSQL available' => 'check_pgsql' /*, + 'YAML' => 'php5-syck' */ +); + +$dependencies_table = ''; +$dep_tpl = '
Currently this page does nothing. Suggestions or patches to make it do something +
Currently this page does very little. Suggestions or patches to make it do something useful will be gratefully received. +
You are currently running DAViCal version $c->version_string.
+The database schema should be at version $want_dbversion and it is at version $c->schema_major.$c->schema_minor.$c->schema_patch.
+
+
+
| Dependency | +Status | +
|---|
The DAViCal client setup page on sourceforge have information on how to configure Evolution, Sunbird, Lightning and Mulberry to use remotely hosted calendars.
diff --git a/htdocs/upgrade.php b/htdocs/upgrade.php index 1801b08a..c57375a7 100644 --- a/htdocs/upgrade.php +++ b/htdocs/upgrade.php @@ -14,19 +14,12 @@ $session->LoginRequired(); include("interactive-page.php"); include("page-header.php"); -$want_dbversion = implode('.',$c->want_dbversion); - echo <<Currently this page does nothing. Suggestions or patches to make it do something
useful will be gratefully received.
The update-davical-database should be run manually after upgrading the software to a new version of DAViCal.