#!/usr/bin/perl
package RVL::Constants;
use Cwd qw(&realpath );
use File::Basename qw(&basename &dirname);
=item
Handdle connect
=cut
#use define RVL_WWW_PATH => dirname(realpath($0));
use define RVL_PATH => dirname(dirname(dirname(__FILE__)));
use define RVL_LIB_PATH => __CONSTANT__::RVL_PATH . '/lib';
#use define RVL_LIB_PATH => dirname(__CONSTANT__::RVL_WWW_PATH).'/lib/RVL';
use define RVL_VAR_DIR => __CONSTANT__::RVL_PATH . '/var';
use define RVL_MOD_DIR => __CONSTANT__::RVL_PATH . '/modules';
=item
Wrong args to function.
=cut
use define RVL_ERROR_INVALIDARGS => -101;
=item
Something wrong with the config.
=cut
use define RVL_ERROR_INVALIDCONFIG => -102;
=item
No data available.
=cut
use define RVL_ERROR_NODATA => -103;
=item
No class exists.
=cut
use define RVL_ERROR_NOCLASS => -104;
=item
No method exists.
=cut
use define RVL_ERROR_NOMETHOD => -105;
=item
No rows were affected by query.
=cut
use define RVL_ERROR_NOAFFECTEDROWS => -106;
=item
Limit queries on unsuppored databases.
=cut
use define RVL_ERROR_NOTSUPPORTED => -107;
=item
Invalid call.
=cut
use define RVL_ERROR_INVALIDCALL => -108;
=item
Authentication failure.
=cut
use define RVL_ERROR_INVALIDAUTH => -109;
=item
Failed to send email.
=cut
use define RVL_ERROR_EMAILFAILURE => -110;
=item
Failed to connect to DB.
=cut
use define RVL_ERROR_DBFAILURE => -111;
=item
A DB transaction failed.
=cut
use define RVL_ERROR_DBTRANSACTIONFAILURE => -112;
=item
User not allow to access site.
=cut
use define RVL_ERROR_BANNEDUSER => -113;
=item
File not found.
=cut
use define RVL_ERROR_NOFILE => -114;
=item
Perms were invalid.
=cut
use define RVL_ERROR_INVALIDFILEPERMS => -115;
=item
Session was invalid.
=cut
use define RVL_ERROR_INVALIDSESSION => -116;
=item
Posted data was invalid.
=cut
use define RVL_ERROR_INVALIDPOST => -117;
=item
Translation invalid.
=cut
use define RVL_ERROR_INVALIDTRANSLATION => -118;
=item
Could not write to the file.
=cut
use define RVL_ERROR_FILEUNWRITABLE => -119;
=item
Method perms were invalid.
=cut
use define RVL_ERROR_INVALIDMETHODPERMS => -120;
=item
Authorisation is invalid.
=cut
use define RVL_ERROR_INVALIDAUTHORISATION => -121;
=item
Request was invalid.
=cut
use define RVL_ERROR_INVALIDREQUEST => -122;
=item
Type invalid.
=cut
use define RVL_ERROR_INVALIDTYPE => -123;
=item
Excessive recursion occured.
=cut
use define RVL_ERROR_RECURSION => -124;
=item
Resource could not be found.
=cut
use define RVL_ERROR_RESOURCENOTFOUND => -404;
use define RVL_MESSAGE_ERROR => 0;
use define RVL_MESSAGE_INFO => 1;
use define RVL_MESSAGE_WARNING => 2;
use define RVL_MESSAGE_SUCCESS => 3;
# automate sorting
use define RVL_SORTBY_GRP => 1;
use define RVL_SORTBY_USER => 2;
use define RVL_SORTBY_ORG => 3;
# user roles
use define RVL_ANY_ROLE => -2;
use define RVL_UNASSIGNED => -1;
use define RVL_GUEST => 0;
use define RVL_ADMIN => 1;
use define RVL_MEMBER => 2;
use define RVL_STATUS_DELETED => 0;
use define RVL_STATUS_FOR_APPROVAL => 1;
use define RVL_STATUS_BEING_EDITED => 2;
use define RVL_STATUS_APPROVED => 3;
use define RVL_STATUS_PUBLISHED => 4;
use define RVL_STATUS_ARCHIVED => 5;
# comment status types
use define RVL_COMMENT_FOR_APPROVAL => 0;
use define RVL_COMMENT_APPROVED => 1;
use define RVL_COMMENT_AKISMET_PASSED => 2;
use define RVL_COMMENT_AKISMET_FAILED => 3;
# define return types, k/v pairs, arrays, strings, etc
use define RVL_RET_NAME_VALUE => 1;
use define RVL_RET_ID_VALUE => 2;
use define RVL_RET_ARRAY => 3;
use define RVL_RET_STRING => 4;
use define RVL_RET_HASH => 5;
# define string element
use define RVL_CHAR => 1;
use define RVL_WORD => 2;
# define language id types
use define RVL_LANG_ID => 1;
use define RVL_LANG_ID_TRANS2 => 2;
# various
use define RVL_ANY_SECTION => 0;
use define RVL_NEXT_ID => 0;
use define RVL_NOTICES_DISABLED => 0;
use define RVL_NOTICES_ENABLED => 1;
use define RVL_RESPONSEFORMAT_JSON => 'json';
use define RVL_RESPONSEFORMAT_XML => 'xml';
use define RVL_RESPONSEFORMAT_HTML => 'html';
use define RVL_RESPONSEFORMAT_PLAIN => 'plain';
use define RVL_RESPONSEFORMAT_JAVASCRIPT => 'javascript';
1;
Copyright 2K16 - 2K18 Indonesian Hacker Rulez