Changeset 678


Ignore:
Timestamp:
May 5, 2019 7:03:40 PM (5 years ago)
Author:
anonymous
Message:
 
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.1dev/lib/Utilities.inc.php

    r651 r678  
    361361}
    362362
     363/*
     364* Converts a string into a URL-safe slug, removing spaces and non word characters.
     365*
     366* @access   public
     367* @param    string  $str    String to convert.
     368* @return   string          URL-safe slug.
     369* @author   Quinn Comendant <quinn@strangecode.com>
     370* @version  1.0
     371* @since    18 Aug 2014 12:54:29
     372*/
     373function URLSlug($str)
     374{
     375    $slug = preg_replace(array('/\W+/u', '/^-+|-+$/'), array('-', ''), $str);
     376    $slug = strtolower($slug);
     377    return $slug;
     378}
     379
    363380/**
    364381 * Return a human readable filesize.
  • trunk/bin/_config.inc.php

    r674 r678  
    7070********************************************************************/
    7171
    72 // Include core libraries.
    73 (include_once 'codebase/lib/App.inc.php') || require_once CODEBASE_PATH . '/lib/App.inc.php';
     72// Include core libraries: try local codebase path first, otherwise use global.
     73(@include_once 'codebase/lib/App.inc.php') || require_once CODEBASE_PATH . '/lib/App.inc.php';
    7474
    7575define('_CLI', true);
Note: See TracChangeset for help on using the changeset viewer.