From 4dd8e30170792f2b84c35046e91d7894dccabf07 Mon Sep 17 00:00:00 2001 From: Jamie Snape Date: Mon, 17 Nov 2014 22:30:27 -0500 Subject: [PATCH] Collapse the numerous constants files into a few less --- core/constant/api.php | 3 +- core/constant/apierror.php | 31 ------------ core/constant/community.php | 24 --------- core/constant/core.php | 89 ++++++++++++++++++++++++++++++++++ core/constant/datatype.php | 28 ----------- core/constant/error.php | 24 --------- core/constant/feed.php | 35 ------------- core/constant/folder.php | 22 --------- core/constant/group.php | 22 --------- core/constant/metadata.php | 27 ----------- core/constant/notification.php | 23 --------- core/constant/policy.php | 26 ---------- core/constant/resourcetype.php | 27 ----------- core/constant/task.php | 21 -------- core/constant/user.php | 23 --------- core/include.php | 22 ++------- 16 files changed, 94 insertions(+), 353 deletions(-) delete mode 100644 core/constant/apierror.php delete mode 100644 core/constant/community.php create mode 100644 core/constant/core.php delete mode 100644 core/constant/datatype.php delete mode 100644 core/constant/error.php delete mode 100644 core/constant/feed.php delete mode 100644 core/constant/folder.php delete mode 100644 core/constant/group.php delete mode 100644 core/constant/metadata.php delete mode 100644 core/constant/notification.php delete mode 100644 core/constant/policy.php delete mode 100644 core/constant/resourcetype.php delete mode 100644 core/constant/task.php delete mode 100644 core/constant/user.php diff --git a/core/constant/api.php b/core/constant/api.php index e2332a070..494de6ee1 100644 --- a/core/constant/api.php +++ b/core/constant/api.php @@ -18,7 +18,6 @@ limitations under the License. =========================================================================*/ -// Web API error codes define('MIDAS_INTERNAL_ERROR', -100); define('MIDAS_INVALID_TOKEN', -101); define('MIDAS_UPLOAD_FAILED', -105); @@ -31,7 +30,6 @@ define('MIDAS_HTTP_ERROR', -153); define('MIDAS_NOT_FOUND', -154); -// List of permission scopes define('MIDAS_API_PERMISSION_SCOPE_ALL', 0); define('MIDAS_API_PERMISSION_SCOPE_READ_USER_INFO', 1); define('MIDAS_API_PERMISSION_SCOPE_WRITE_USER_INFO', 2); @@ -40,6 +38,7 @@ define('MIDAS_API_PERMISSION_SCOPE_ADMIN_DATA', 5); define('MIDAS_API_PERMISSION_SCOPE_READ_GROUPS', 6); define('MIDAS_API_PERMISSION_SCOPE_MANAGE_GROUPS', 7); + Zend_Registry::set( 'permissionScopeMap', array( diff --git a/core/constant/apierror.php b/core/constant/apierror.php deleted file mode 100644 index 39a215750..000000000 --- a/core/constant/apierror.php +++ /dev/null @@ -1,31 +0,0 @@ -