Fork me on GitHub

What is the proper way for multiple constants?  Bottom

  • I get sometimes

    Code

    constant _CONSTANTTERM already defined


    When this happens, should it be deleted/commented out in eg. modules/module/pnlang/user.php or somewhere else?

    - Igor
  • You can add this if statement around it:

    Code

    if (!defined('_CONSTANT') {
       define('');
    }


    --
    itbegins.co.uk - Zikula Consulting

    birtwistle.me.uk - Personal Blog


    Please read the Support Guide
  • Thank you, but if it's definied somewhere else, where could it be then?

    language/-lang-/core.php?

    - Igor
  • I first check language/yourlang, then check includes/language/blocks/yourlang, then /themes/yourtheme/lang/yourlang, then check module/themodule/pnlang/yourlang. That way I'm working through PostNukes hierarchy, and the first one I come across is the one I keep, then as I drill down I comment them out.

    If the core defines it, then let it I figure... even when writing modules I always check for the existance of the define in the above order so as not to create this very problem.

    --
    Under Construction!
  • I agree, but this 0.8 installation has no extra modules installed [before] and 'report all errors' on, I get eg.

    Code

    (string) 0 = config/languages/eng/Users/admin.php
    (string) 1 = system/Users/pnlang/eng/admin.php

    So, should I report it [I mean it's not really a big issue] and which will be kept?

    - Igor

This list is based on users active over the last 60 minutes.