Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Karlitschek <frank@owncloud.org>2012-05-05 12:18:45 +0400
committerFrank Karlitschek <frank@owncloud.org>2012-05-05 12:18:45 +0400
commit9bcc5c11a8785a567ded6c0e4ab3a40966785606 (patch)
treecb50df0695f11fb8132a35e214caa8cd211bb9a2 /apps/files_sharing
parent4a89eb77c1732a49075d4f3f6a46ddaad10eef70 (diff)
porting the hooks and starting with the templates
Diffstat (limited to 'apps/files_sharing')
-rwxr-xr-xapps/files_sharing/appinfo/app.php12
-rwxr-xr-xapps/files_sharing/lib_share.php4
2 files changed, 8 insertions, 8 deletions
diff --git a/apps/files_sharing/appinfo/app.php b/apps/files_sharing/appinfo/app.php
index f80bdb9e195..bd81a45cc55 100755
--- a/apps/files_sharing/appinfo/app.php
+++ b/apps/files_sharing/appinfo/app.php
@@ -4,12 +4,12 @@ require_once('apps/files_sharing/sharedstorage.php');
OC::$CLASSPATH['OC_Share'] = "apps/files_sharing/lib_share.php";
OCP\App::registerAdmin('files_sharing', 'settings');
-OC_Hook::connect("OC_Filesystem", "post_delete", "OC_Share", "deleteItem");
-OC_Hook::connect("OC_Filesystem", "post_rename", "OC_Share", "renameItem");
-OC_Hook::connect("OC_Filesystem", "post_write", "OC_Share", "updateItem");
-OC_Hook::connect('OC_User', 'post_deleteUser', 'OC_Share', 'removeUser');
-OC_Hook::connect('OC_User', 'post_addToGroup', 'OC_Share', 'addToGroupShare');
-OC_Hook::connect('OC_User', 'post_removeFromGroup', 'OC_Share', 'removeFromGroupShare');
+OCP\Util::connectHook("OC_Filesystem", "post_delete", "OC_Share", "deleteItem");
+OCP\Util::connectHook("OC_Filesystem", "post_rename", "OC_Share", "renameItem");
+OCP\Util::connectHook("OC_Filesystem", "post_write", "OC_Share", "updateItem");
+OCP\Util::connectHook('OC_User', 'post_deleteUser', 'OC_Share', 'removeUser');
+OCP\Util::connectHook('OC_User', 'post_addToGroup', 'OC_Share', 'addToGroupShare');
+OCP\Util::connectHook('OC_User', 'post_removeFromGroup', 'OC_Share', 'removeFromGroupShare');
$dir = isset($_GET['dir']) ? $_GET['dir'] : '/';
if ($dir != '/Shared' || OCP\Config::getAppValue('files_sharing', 'resharing', 'yes') == 'yes') {
OCP\Util::addscript("files_sharing", "share");
diff --git a/apps/files_sharing/lib_share.php b/apps/files_sharing/lib_share.php
index fe8aa64fa81..71cca309776 100755
--- a/apps/files_sharing/lib_share.php
+++ b/apps/files_sharing/lib_share.php
@@ -410,7 +410,7 @@ class OC_Share {
$source = "/".OCP\USER::getUser()."/files".self::cleanPath($arguments['path']);
if ($target = self::getTarget($source)) {
// Forward hook to notify of changes to target file
- OC_Hook::emit("OC_Filesystem", "post_delete", array('path' => $target));
+ OCP\Util::emitHook("OC_Filesystem", "post_delete", array('path' => $target));
$query = OCP\DB::prepare("DELETE FROM *PREFIX*sharing WHERE SUBSTR(source, 1, ?) = ? AND uid_owner = ?");
$query->execute(array(strlen($source), $source, OCP\USER::getUser()));
}
@@ -432,7 +432,7 @@ class OC_Share {
$source = "/".OCP\USER::getUser()."/files".self::cleanPath($arguments['path']);
if ($target = self::getTarget($source)) {
// Forward hook to notify of changes to target file
- OC_Hook::emit("OC_Filesystem", "post_write", array('path' => $target));
+ OCP\Util::emitHook("OC_Filesystem", "post_write", array('path' => $target));
}
}