Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mantisbt/mantisbt
base: 6c79f5d39801
Choose a base ref
...
head repository: mantisbt/mantisbt
compare: 6ccec55ee982
Choose a head ref
  • 19 commits
  • 647 files changed
  • 1 contributor

Commits on Oct 21, 2012

  1. Further work on Exceptions

    mantis committed Oct 21, 2012
    Configuration menu
    Copy the full SHA
    82d615b View commit details
    Browse the repository at this point in the history

Commits on Oct 28, 2012

  1. Replace PHP UTF-8 library with PHP's mbstring extension

    Git Commit ID: beb4c5b
    
    For MantisBT 1.2.x, the PHP UTF-8 library at [1] was selected to provide
    proper Unicode support to MantisBT. This library wraps around PHP's
    mbstring extension and provides an alternative implemented-in-PHP
    approach where the mbstring extension is not available on a server
    running MantisBT. mbstring is a PHP extension that is not bundled with
    PHP by default. Linux distributions already package the extension and it
    is trivial to install. The extension is also bundled with the Windows
    .zip distribution of PHP for Windows users and is also trivial to
    install.
    
    The need to support platform configurations where mbstring isn't
    available and can't be installed stems from the days when shared hosting
    was popular. With the popularisation of virtualisation (virtual private
    servers) as a cheap replacement to shared hosting, administrators once
    again have control over their own platform, allowing them to install PHP
    extensions whenever they please. Popular Linux distributions have been
    packaging and making the mbstring PHP extension available for a long
    time. Installation on Windows platforms is also trivial (relative to the
    complexity of Windows platforms due to a lack of software package
    management functionality).
    
    Removal of the PHP UTF-8 wrapper simplifies MantisBT's code base and
    likely improves performance (no need to wrap function calls and compile
    and load an entire UTF-8 library into memory). More importantly,
    MantisBT no longer depends on a small library that hasn't seen updates
    since 2007. Reliance on mbstring is a less risky option because it is
    more widely used and ties in with PHP's official infrastructure and
    support/documentation system.
    
    MantisBT's documentation has been updated and expanded to reflect the
    new installation requirement. Links to external documentation on php.net
    have also been provided to guide new users in performing the simple
    action of adding the mbstring extension.
    
    [1] http://sourceforge.net/projects/phputf8/
    mantis committed Oct 28, 2012
    Configuration menu
    Copy the full SHA
    6a165ba View commit details
    Browse the repository at this point in the history
  2. Add new Locale i18n/l10n API to replace lang_api

    Commit: 4deea44
    
    This is some initial work towards replacing lang_api with a new Locale
    API that makes use of PHP's gettext support for translation.
    
    gettext offers the following advantages:
    a) Greater performance
    b) Better supporting tools for translation work
    c) Import/export support at MediaWiki.net that doesn't require
    MantisBT-specific hacks
    d) Pluralisation (1 thing vs 1 things)
    e) en-US language is embedded in the source code and acts as a key --
    this makes the source code easier to read and sections of code easier to
    find upon searching for UI strings
    f) Easy plugin support via loading of new text domains
    g) Ability to perform more specific translations (en-US, en-GB,
    en-AU...) rather than "one English fits all"
    h) Support for context aware translations
    
    There is lot of negativity in the wild regarding gettext and PHP.
    Typical arguments include:
    
    1. Lack of thread safety - this is no longer an issue with php-fpm (or
    earlier Fast CGI methods) because each script will execute in a separate
    process. Threaded execution of PHP under mod_php (Apache) or an IIS
    equivalent is thoroughly deprecated and not recommended for numerous
    reasons.
    
    2. gettext is difficult to install with PHP - Linux distributions of PHP
    will most likely have gettext enabled by default. If not, packages are
    readily available in all the major distribution repositories. Windows
    users are given php_gettext.dll in the .zip distribution of PHP and
    simple instructions at [1] can be followed to get things up and running
    quickly.
    
    3. The gettext API is "inconsistent" or doesn't support xyz - it's
    trivial to create a new wrapper function around these APIs that allows
    us to implement enhanced functionality or make the API easier to use.
    
    Don't be tricked by the outdated negativity from the early 2000's.
    gettext is an "industry standard" and is not going away any time soon.
    
    [1] http://php.net/manual/en/install.windows.extensions.php
    mantis committed Oct 28, 2012
    Configuration menu
    Copy the full SHA
    159be15 View commit details
    Browse the repository at this point in the history

Commits on Nov 11, 2012

  1. phpdoc changes

    mantis committed Nov 11, 2012
    Configuration menu
    Copy the full SHA
    83168de View commit details
    Browse the repository at this point in the history
  2. Add additional exceptions

    mantis committed Nov 11, 2012
    Configuration menu
    Copy the full SHA
    2184342 View commit details
    Browse the repository at this point in the history
  3. Remove ERROR_ constants and ERROR_STRINGS[...] translations

    The new Locale API (using gettext) and the new Exception approach to
    error handling in MantisBT means that ERROR_ constants are now
    unnecessary.
    
    All exceptions have been updated to use gettext for translating error
    strings. Because many of the error messages have been rewritten in the
    process, translations have been dropped. It is expected that we'll need
    to recommence translating MantisBT from scratch after the new Locale API
    is fully implemented. Why?
    
    1. We need to support pluralisation.
    2. We need to factor in the context of strings that need translating.
    3. Many old error messages/strings are confusing and desperately in need
    of updating.
    4. A move towards modern web standards compliant HTML will greatly
    increase the number of strings needing translation: alt and title
    attributes on images and hyperlinks being just one example.
    5. Huge chunks of MantisBT are likely going to be rewritten or
    redesigned, dramatically changing the strings/error messages that need
    to be translated.
    
    As part of this change error codes have also been removed from MantisBT
    exceptions. These codes do not add any value because exception class
    names already provide unique identification (that is superior than just
    a random number).
    
    Exception constructors are also heavily simplified -- now containing
    just a single argument for the error message.
    
    MantisBT\Error has also been cleaned up further in preparation for
    removal/replacement with a modern exception handler/displayer. We no
    longer have an error_handler: all errors are converted to exceptions of
    type ErrorException and handled by exception_handler. This removes a lot
    of duplication and complexity.
    mantis committed Nov 11, 2012
    Configuration menu
    Copy the full SHA
    c30bfb8 View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2013

  1. Configuration menu
    Copy the full SHA
    d5add72 View commit details
    Browse the repository at this point in the history

Commits on Jan 20, 2013

  1. Configuration menu
    Copy the full SHA
    ee96a86 View commit details
    Browse the repository at this point in the history
  2. Update Copyright Statements

    mantis committed Jan 20, 2013
    Configuration menu
    Copy the full SHA
    8f72b64 View commit details
    Browse the repository at this point in the history
  3. remove unused function param

    mantis committed Jan 20, 2013
    Configuration menu
    Copy the full SHA
    0695ceb View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2013

  1. Configuration menu
    Copy the full SHA
    b55d30c View commit details
    Browse the repository at this point in the history
  2. fix typo

    mantis committed Jan 23, 2013
    Configuration menu
    Copy the full SHA
    ed227dd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8c3f6a0 View commit details
    Browse the repository at this point in the history
  4. Use config_get_global instead of config_get for retrieving cookie

    related configuration options. They are always global and failure to
    treat them as such will cause infinite call loops. These loops occur
    when config_get calls authentication_api functions which check for a
    user cookie (calling config_get to retrieve settings related to
    cookies).
    
    commit 83619f3
    mantis committed Jan 23, 2013
    Configuration menu
    Copy the full SHA
    cb49d0b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    24745db View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2013

  1. Replace plugin_lang_get with new gettext approach

    The replacement of lang_get() calls for strings in the 'core' text
    domain has mostly been completed. Plugins were calling a separate
    function plugin_lang_get() that told lang_api (now deprecated) to use
    the plugin-specific "lang" directory for translations specific to
    plugins.
    
    This new approach loads a text domain specific to each plugin prior to
    plugin initialisation. Just as MantisBT core has a "locale" directory,
    each plugin also needs a "locale" directory.
    
    plugin_lang_get(...) has been completely removed and d___(...) and
    dn_(...) should be used instead. This new syntax may change to something
    simler and easier to handle in the near future.
    
    Commit: d956d32
    mantis committed Jan 24, 2013
    Configuration menu
    Copy the full SHA
    5bf9b2e View commit details
    Browse the repository at this point in the history

Commits on Feb 4, 2013

  1. Configuration menu
    Copy the full SHA
    52c646c View commit details
    Browse the repository at this point in the history
  2. Further lang_get updates

    mantis committed Feb 4, 2013
    Configuration menu
    Copy the full SHA
    b97cdba View commit details
    Browse the repository at this point in the history

Commits on Feb 7, 2013

  1. Configuration menu
    Copy the full SHA
    6ccec55 View commit details
    Browse the repository at this point in the history