diff --git a/plugins/owncloud/owncloud.php b/plugins/owncloud/owncloud.php index e63ff959c..85ba35805 100644 --- a/plugins/owncloud/owncloud.php +++ b/plugins/owncloud/owncloud.php @@ -16,12 +16,57 @@ 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 "