Changeset 500 for trunk/bin


Ignore:
Timestamp:
Nov 15, 2014 9:34:39 PM (9 years ago)
Author:
anonymous
Message:

Many auth and crypto changes; various other bugfixes while working on pulso.

Location:
trunk/bin/module_maker
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/module_maker/_config.inc.php

    r468 r500  
    3535
    3636// Make sure necessary files exist.
    37 if (!file_exists(COMMON_BASE . '/global/db_auth.inc.php')) {
     37$db_auth_file = false;
     38$rii = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(COMMON_BASE));
     39$rii->setMaxDepth(2);
     40foreach ($rii as $filename => $file) {
     41    if (mb_strpos($filename, 'db_auth.inc.php') !== false) {
     42        $db_auth_file = $filename;
     43        break;
     44    }
     45}
     46
     47if (!$db_auth_file) {
    3848    die("Error: First argument directory must contain the global/db_auth.inc.php file with valid MySQL credentials.\n");
    3949}
     
    6373    'log_screen_priority' => LOG_DEBUG,
    6474));
    65 require_once 'global/db_auth.inc.php';
     75require_once $db_auth_file;
    6676
    6777// Start application-based functionality: database, session, environment, ini setup, etc.
  • trunk/bin/module_maker/module.cli.php

    r468 r500  
    55 * For details visit the project site: <http://trac.strangecode.com/codebase/>
    66 * Copyright 2001-2012 Strangecode, LLC
    7  * 
     7 *
    88 * This file is part of The Strangecode Codebase.
    99 *
     
    1212 * Free Software Foundation, either version 3 of the License, or (at your option)
    1313 * any later version.
    14  * 
     14 *
    1515 * The Strangecode Codebase is distributed in the hope that it will be useful, but
    1616 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1717 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
    1818 * details.
    19  * 
     19 *
    2020 * You should have received a copy of the GNU General Public License along with
    2121 * The Strangecode Codebase. If not, see <http://www.gnu.org/licenses/>.
     
    3939
    4040    " . basename($_SERVER['argv'][0]) . " site_directory name_singular name_plural [operation]
    41    
     41
    4242Valid operations include: " . join(', ', $valid_ops) . "
    4343
     
    149149    if (!is_dir("$public_tpl_dir")) {
    150150        die(basename($_SERVER['argv'][0]) . " Error: public_tpl_dir '$public_tpl_dir' directory not found.\n");
    151     }   
     151    }
    152152}
    153153
     
    196196        $type = preg_replace('/^(\w+).*$/', '\\1', $col[1]);
    197197        $default = $col[4];
    198        
     198
    199199        if (mb_strpos($default, '0000') !== false || '0' == $default) {
    200200            $default = '';
  • trunk/bin/module_maker/skel/admin.php

    r479 r500  
    408408    ";
    409409
    410     // Use a cash hash to determine if the result-set has changed.
     410    // Use a cache hash to determine if the result-set has changed.
    411411    // A unique key for this query, with the total_items in case db records
    412412    // were added since the last cache. This identifies a unique set of
Note: See TracChangeset for help on using the changeset viewer.