summaryrefslogtreecommitdiffstats
path: root/apps/admin_audit
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-07-01 11:28:03 +0200
committerJoas Schilling <coding@schilljs.com>2017-07-01 11:33:20 +0200
commit8260d4bf73b3ff50ebbf53680fcafb7f320a3977 (patch)
tree47fa2395f6ea378cddc4ae954837fd80a49631be /apps/admin_audit
parent2afb4857cca4ca5eb48af63ab814727cfe77b1bd (diff)
downloadnextcloud-server-8260d4bf73b3ff50ebbf53680fcafb7f320a3977.tar.gz
nextcloud-server-8260d4bf73b3ff50ebbf53680fcafb7f320a3977.zip
Move to PSR-4
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/admin_audit')
-rw-r--r--apps/admin_audit/appinfo/app.php5
-rw-r--r--apps/admin_audit/appinfo/info.xml1
-rw-r--r--apps/admin_audit/lib/Actions/Action.php (renamed from apps/admin_audit/lib/actions/action.php)3
-rw-r--r--apps/admin_audit/lib/Actions/Auth.php (renamed from apps/admin_audit/lib/actions/auth.php)5
-rw-r--r--apps/admin_audit/lib/Actions/Files.php (renamed from apps/admin_audit/lib/actions/files.php)5
-rw-r--r--apps/admin_audit/lib/Actions/GroupManagement.php (renamed from apps/admin_audit/lib/actions/groupmanagement.php)6
-rw-r--r--apps/admin_audit/lib/Actions/Sharing.php (renamed from apps/admin_audit/lib/actions/sharing.php)7
-rw-r--r--apps/admin_audit/lib/Actions/Trashbin.php (renamed from apps/admin_audit/lib/actions/trashbin.php)3
-rw-r--r--apps/admin_audit/lib/Actions/UserManagement.php (renamed from apps/admin_audit/lib/actions/usermanagement.php)7
-rw-r--r--apps/admin_audit/lib/Actions/Versions.php (renamed from apps/admin_audit/lib/actions/versions.php)3
-rw-r--r--apps/admin_audit/lib/AppInfo/Application.php31
-rw-r--r--apps/admin_audit/lib/AuditLogger.php (renamed from apps/admin_audit/lib/auditlogger.php)16
12 files changed, 66 insertions, 26 deletions
diff --git a/apps/admin_audit/appinfo/app.php b/apps/admin_audit/appinfo/app.php
index 59f7e3987a1..b87b12df8b6 100644
--- a/apps/admin_audit/appinfo/app.php
+++ b/apps/admin_audit/appinfo/app.php
@@ -23,12 +23,15 @@
*
*/
+
+$app = new \OCA\AdminAudit\AppInfo\Application();
+
$logger = \OC::$server->getLogger();
$userSession = \OC::$server->getUserSession();
$groupManager = \OC::$server->getGroupManager();
$eventDispatcher = \OC::$server->getEventDispatcher();
-$auditLogger = new \OCA\Admin_Audit\AuditLogger(
+$auditLogger = new \OCA\AdminAudit\AuditLogger(
$logger,
$userSession,
$groupManager,
diff --git a/apps/admin_audit/appinfo/info.xml b/apps/admin_audit/appinfo/info.xml
index b29b0f0b01d..3b7a7a89570 100644
--- a/apps/admin_audit/appinfo/info.xml
+++ b/apps/admin_audit/appinfo/info.xml
@@ -6,6 +6,7 @@
<licence>AGPL</licence>
<author>Nextcloud</author>
<version>1.3.0</version>
+ <namespace>AdminAudit</namespace>
<dependencies>
<nextcloud min-version="13" max-version="13" />
</dependencies>
diff --git a/apps/admin_audit/lib/actions/action.php b/apps/admin_audit/lib/Actions/Action.php
index 2d036675869..d9257b53fd5 100644
--- a/apps/admin_audit/lib/actions/action.php
+++ b/apps/admin_audit/lib/Actions/Action.php
@@ -20,7 +20,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-namespace OCA\Admin_Audit\Actions;
+
+namespace OCA\AdminAudit\Actions;
use OCP\ILogger;
diff --git a/apps/admin_audit/lib/actions/auth.php b/apps/admin_audit/lib/Actions/Auth.php
index 405ea5e6d22..a6a37409b96 100644
--- a/apps/admin_audit/lib/actions/auth.php
+++ b/apps/admin_audit/lib/Actions/Auth.php
@@ -20,12 +20,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-namespace OCA\Admin_Audit\Actions;
+
+namespace OCA\AdminAudit\Actions;
/**
* Class Auth logs all auth related actions
*
- * @package OCA\Admin_Audit\Actions
+ * @package OCA\AdminAudit\Actions
*/
class Auth extends Action {
public function loginAttempt(array $params) {
diff --git a/apps/admin_audit/lib/actions/files.php b/apps/admin_audit/lib/Actions/Files.php
index e8d178e6070..2f8626497cb 100644
--- a/apps/admin_audit/lib/actions/files.php
+++ b/apps/admin_audit/lib/Actions/Files.php
@@ -20,12 +20,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-namespace OCA\Admin_Audit\Actions;
+
+namespace OCA\AdminAudit\Actions;
/**
* Class Files logs the actions to files
*
- * @package OCA\Admin_Audit\Actions
+ * @package OCA\AdminAudit\Actions
*/
class Files extends Action {
/**
diff --git a/apps/admin_audit/lib/actions/groupmanagement.php b/apps/admin_audit/lib/Actions/GroupManagement.php
index 34aec7812c5..07d65ec0687 100644
--- a/apps/admin_audit/lib/actions/groupmanagement.php
+++ b/apps/admin_audit/lib/Actions/GroupManagement.php
@@ -23,18 +23,16 @@
*
*/
+namespace OCA\AdminAudit\Actions;
-namespace OCA\Admin_Audit\Actions;
-
-use OCA\Admin_Audit\Actions\Action;
use OCP\IGroup;
use OCP\IUser;
/**
* Class GroupManagement logs all group manager related events
*
- * @package OCA\Admin_Audit
+ * @package OCA\AdminAudit\Actions
*/
class GroupManagement extends Action {
diff --git a/apps/admin_audit/lib/actions/sharing.php b/apps/admin_audit/lib/Actions/Sharing.php
index 85afeccd6fc..48e8121f8b0 100644
--- a/apps/admin_audit/lib/actions/sharing.php
+++ b/apps/admin_audit/lib/Actions/Sharing.php
@@ -20,13 +20,16 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-namespace OCA\Admin_Audit\Actions;
+
+namespace OCA\AdminAudit\Actions;
+
+
use OCP\Share;
/**
* Class Sharing logs the sharing actions
*
- * @package OCA\Admin_Audit\Actions
+ * @package OCA\AdminAudit\Actions
*/
class Sharing extends Action {
/**
diff --git a/apps/admin_audit/lib/actions/trashbin.php b/apps/admin_audit/lib/Actions/Trashbin.php
index b04bd6b8f61..27830345b6c 100644
--- a/apps/admin_audit/lib/actions/trashbin.php
+++ b/apps/admin_audit/lib/Actions/Trashbin.php
@@ -21,8 +21,7 @@
*
*/
-
-namespace OCA\Admin_Audit\Actions;
+namespace OCA\AdminAudit\Actions;
class Trashbin extends Action {
diff --git a/apps/admin_audit/lib/actions/usermanagement.php b/apps/admin_audit/lib/Actions/UserManagement.php
index 0ee192d9a31..6cb70fad50c 100644
--- a/apps/admin_audit/lib/actions/usermanagement.php
+++ b/apps/admin_audit/lib/Actions/UserManagement.php
@@ -21,13 +21,16 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-namespace OCA\Admin_Audit\Actions;
+
+namespace OCA\AdminAudit\Actions;
+
+
use OCP\IUser;
/**
* Class UserManagement logs all user management related actions.
*
- * @package OCA\Admin_Audit\Actions
+ * @package OCA\AdminAudit\Actions
*/
class UserManagement extends Action {
/**
diff --git a/apps/admin_audit/lib/actions/versions.php b/apps/admin_audit/lib/Actions/Versions.php
index 3e690e12a25..9c8a1c81326 100644
--- a/apps/admin_audit/lib/actions/versions.php
+++ b/apps/admin_audit/lib/Actions/Versions.php
@@ -21,8 +21,7 @@
*
*/
-
-namespace OCA\Admin_Audit\Actions;
+namespace OCA\AdminAudit\Actions;
class Versions extends Action {
diff --git a/apps/admin_audit/lib/AppInfo/Application.php b/apps/admin_audit/lib/AppInfo/Application.php
new file mode 100644
index 00000000000..26df5e54913
--- /dev/null
+++ b/apps/admin_audit/lib/AppInfo/Application.php
@@ -0,0 +1,31 @@
+<?php
+/**
+ * @copyright Copyright (c) 2017 Joas Schilling <coding@schilljs.com>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OCA\AdminAudit\AppInfo;
+
+use OCP\AppFramework\App;
+
+class Application extends App {
+
+ public function __construct() {
+ parent::__construct('admin_audit');
+ }
+}
diff --git a/apps/admin_audit/lib/auditlogger.php b/apps/admin_audit/lib/AuditLogger.php
index 4e1909c6475..0dd3e3b347f 100644
--- a/apps/admin_audit/lib/auditlogger.php
+++ b/apps/admin_audit/lib/AuditLogger.php
@@ -24,17 +24,17 @@
*
*/
-namespace OCA\Admin_Audit;
+namespace OCA\AdminAudit;
use OC\Files\Filesystem;
use OC\Files\Node\File;
-use OCA\Admin_Audit\Actions\Auth;
-use OCA\Admin_Audit\Actions\Files;
-use OCA\Admin_Audit\Actions\GroupManagement;
-use OCA\Admin_Audit\Actions\Sharing;
-use OCA\Admin_Audit\Actions\Trashbin;
-use OCA\Admin_Audit\Actions\UserManagement;
-use OCA\Admin_Audit\Actions\Versions;
+use OCA\AdminAudit\Actions\Auth;
+use OCA\AdminAudit\Actions\Files;
+use OCA\AdminAudit\Actions\GroupManagement;
+use OCA\AdminAudit\Actions\Sharing;
+use OCA\AdminAudit\Actions\Trashbin;
+use OCA\AdminAudit\Actions\UserManagement;
+use OCA\AdminAudit\Actions\Versions;
use OCP\IGroupManager;
use OCP\ILogger;
use OCP\IPreview;