Giter Club home page Giter Club logo

Comments (6)

webbird avatar webbird commented on July 18, 2024

I've started a new class CAT_Registry as a collector for any kind of global data.

There are more files that contain definitions in ./backend/interface (time- and date formats, charsets, etc.). They should be removed, too. I'd suggest to move them into a subfolder ./framework/CAT/Registry or into the DB, so the user can extend them.

from blackcatcms.

webbird avatar webbird commented on July 18, 2024

File sys.constants.php

These seem to be used nowhere (found no occurances in repo search):

define('USERS_DELETED',            1);  // user marked as deleted
define('USERS_ACTIVE',             2);  // user is activated
define('USERS_CAN_SETTINGS',       4);  // user can change own settings
define('USERS_CAN_SELFDELETE',     8);  // user can delete himself
define('USERS_PROFILE_ALLOWED',   16);  // user can create a profile page
define('USERS_PROFILE_AVAIL',     32);  // user has fullfilled profile
define('USERS_DEFAULT_SETTINGS', USERS_ACTIVE | USERS_CAN_SETTINGS);

define('MODULE_DO_START',            0); // default
define('MODULE_DO_VIEW',             0); // default
define('MODULE_DO_INSTALL',          1);
define('MODULE_DO_UNINSTALL',        2);
define('MODULE_DO_REREGISTER',       4);
define('MODULE_DO_UPGRADE',          8);

To be moved somewhere else:

define('AUTH_MIN_PASS_LENGTH',      6); // minimum lenght a new password must have
define('AUTH_MAX_PASS_LENGTH',    128); // maximum lenght of a password.
define('AUTH_MIN_LOGIN_LENGTH',     3); // minimum lenght a login-name must have
define('AUTH_MAX_LOGIN_LENGTH',   128); // maximum lenght a login-name can have

    if (!defined('E_USER_DEPRECATED')) define('E_USER_DEPRECATED', 16384);

    define('URL_HELP', 'http://blackcat-cms.org/');

from blackcatcms.

webbird avatar webbird commented on July 18, 2024

Moved AUTH_* to CAT_Users class, URL_HELP to initialize.php.

No use for USERS_* and MODULE_* at the moment.

E_USER_DEPRECATED was introduced with PHP 5.3, which is required for BlackCat CMS, so we don't need that line.

So, sys.constants.php is history. :)

from blackcatcms.

webbird avatar webbird commented on July 18, 2024

Found an occurance of USERS_PROFILE_ALLOWED, so I added this to CAT_Users.

from blackcatcms.

webbird avatar webbird commented on July 18, 2024

Moved er_levels to initialize.php; removed ./interface/er_levels.php

from blackcatcms.

webbird avatar webbird commented on July 18, 2024

I close this issue, though we still have some occurances of define(). We can replace them as we stumble upon. Most of the work is done.

from blackcatcms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.