diff --git a/plugins/owncloud/owncloud.php b/plugins/owncloud/owncloud.php index 99b7a37b..06aeda70 100644 --- a/plugins/owncloud/owncloud.php +++ b/plugins/owncloud/owncloud.php @@ -22,12 +22,58 @@ class OwnCloud extends Plugin { $this->host = $host; $host->add_hook($host::HOOK_ARTICLE_BUTTON, $this); + $host->add_hook($host::HOOK_PREFS_TAB, $this); + } + + function save() { + $owncloud_url = db_escape_string($_POST["owncloud_url"]); + $this->host->set($this, "owncloud", $owncloud_url); + echo "Value set to $owncloud_url"; } function get_js() { return file_get_contents(dirname(__FILE__) . "/owncloud.js"); } + function hook_prefs_tab($args) { + if ($args != "prefPrefs") return; + + print "