Ignore:
Timestamp:
Dec 18, 2005 12:16:03 AM (18 years ago)
Author:
scdev
Message:

detabbed all files ;P

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/module_maker/module.cli.php

    r41 r42  
    1717} else {
    1818    die(basename($_SERVER['argv'][0]) . " Error: invalid arguments. Try like this:
    19    
     19
    2020    " . basename($_SERVER['argv'][0]) . " site_directory name_singular name_plural [clean]
    2121
     
    4646    break;
    4747default :
    48    
     48
    4949}
    5050
     
    9191    trashFile("$public_dir/$public_script");
    9292    trashFile("$public_tpl_dir/$public_list_template");
    93     trashFile("$public_tpl_dir/$public_detail_template");   
     93    trashFile("$public_tpl_dir/$public_detail_template");
    9494    echo "End file cleanup\n";
    9595    die;
     
    163163if (is_array($cols) && !empty($cols)) {
    164164    foreach ($cols as $col) {
    165        
     165
    166166        // Human readable.
    167167        $field = $col[0];
     
    169169        $type = preg_replace('/^(\w+).*$/', '\\1', $col[1]);
    170170        $default = $col[4];
    171        
     171
    172172        // Get primary key.
    173173//         if ('PRI' == $col[3]) {
    174174//             $primary_key = $field;
    175175//         }
    176        
     176
    177177        // Our form will require type="multipart/form-data".
    178178        if (preg_match('/file|image/i', $field)) {
    179179            $upload_file_capability = true;
    180180        }
    181        
     181
    182182        // Column headers.
    183183        $headers[$field] = $field_title;
    184        
     184
    185185        // Get php code for printing variables.
    186186        $public_list_page_vars[] = "<\x3fphp echo oTxt(\$" . $module_name_singular . "_list[\$i]['$field']); \x3f>";
     
    222222    // Form arguments
    223223    $replace['admin_form_tag_init'] = "<form enctype=\"multipart/form-data\" method=\"post\" action=\"<\x3fphp echo \$_SERVER['PHP_SELF']; \x3f>\">\n<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"<##>\" />";
    224    
     224
    225225    // Include statement.
    226226    $replace['admin_upload_include'] = "require_once 'codebase/lib/Upload.inc.php';\n";
     
    245245// Copy uploaded image name into form data.
    246246\$_POST['<##>'] = isset(\$_FILES['<##>']) ? \$_FILES['<##>']['name'] : '';
    247  
     247
    248248
    249249E_O_F;
     
    261261    $replace['admin_upload_insert'] = <<<E_O_F
    262262
    263         // Upload files with prepended primary key.
     263        // Upload files with prepended primary key.
    264264        \$new_file = \$upload->process('<##>',  \$%PRIMARY_KEY% . '_' . getFormData('<##>'));
    265265
     
    443443if ('var' == $op) {
    444444    if (isset($replace[$_SERVER['argv'][5]])) {
    445         echo "\n\n" . $replace[$_SERVER['argv'][5]] . "\n\n";
     445        echo "\n\n" . $replace[$_SERVER['argv'][5]] . "\n\n";
    446446    } else if (isset($skel_files[$_SERVER['argv'][5]])) {
    447447        echo "\n\n" . preg_replace($search, $replace, $skel_files[$_SERVER['argv'][5]]) . "\n\n";
     
    540540    global $user_trash_folder;
    541541    static $file_prefix;
    542    
     542
    543543    if (!isset($file_prefix)) {
    544544        $file_prefix = time();
     
    546546        $file_prefix++;
    547547    }
    548    
     548
    549549    // Make user trash folder.
    550550    if (!dir($user_trash_folder)) {
Note: See TracChangeset for help on using the changeset viewer.