Changeset 44 for trunk/bin


Ignore:
Timestamp:
Dec 19, 2005 7:10:45 AM (18 years ago)
Author:
scdev
Message:

${1}

Location:
trunk/bin/module_maker
Files:
3 edited

Legend:

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

    r43 r44  
    3434
    3535$exclude = array('added_by_user_id', 'added_datetime', 'hit_count', 'modified_datetime', 'modified_by_user_id');
    36 $primary_key_field = '';
     36$primary_key = '<##>';
    3737$output = array();
    3838
     
    4646        $type = preg_replace('/^(\w+).*$/', '\\1', $col[1]);
    4747        if ('PRI' == $col[3]) {
    48             $primary_key_field = $field;
     48            $primary_key = $field;
    4949        }
    5050
     
    5454        }
    5555
    56         if (in_array($field, $exclude) || $primary_key_field == $field) {
     56        if (in_array($field, $exclude) || $primary_key == $field) {
    5757            // Don't add a field for this column.
    5858            continue;
     
    8787        <td>
    8888            <input type="file" name="$field" />
    89             <\x3fphp if ('' != \$upload->getFilenameGlob(getFormData('$primary_key_field') . '_*') && getFormData('op') == 'edit' || getFormData('op') == 'update') { \x3f>
    90             <div class="help"><\x3fphp printf(_("The current file <a href=\"%s/%2\\\$s\"><strong>%2\\\$s</strong></a> will be deleted if a new file is selected for upload."), '/_db_files/<##>', \$upload->getFilenameGlob(getFormData('$primary_key_field') . '_*')) \x3f></div>
     89            <\x3fphp if ('' != \$upload->getFilenameGlob(getFormData('$primary_key') . '_*') && getFormData('op') == 'edit' || getFormData('op') == 'update') { \x3f>
     90            <div class="help"><\x3fphp printf(_("The current file <a href=\"%s/%2\\\$s\"><strong>%2\\\$s</strong></a> will be deleted if a new file is selected for upload."), '/_db_files/<##>', \$upload->getFilenameGlob(getFormData('$primary_key') . '_*')) \x3f></div>
    9191            <\x3fphp } \x3f>
    9292            <div class="help"><\x3fphp printf(_("File to upload must have one of the following file-name extensions: %s."), join(', ', \$upload->getParam('valid_file_extensions'))) \x3f></div>
  • trunk/bin/module_maker/list_template.cli.php

    r43 r44  
    4545    $cols[] = $row;
    4646}
     47
     48$primary_key = '<##>';
    4749
    4850// Loop through columns
  • trunk/bin/module_maker/sql.cli.php

    r43 r44  
    5252
    5353$sort_columns = '';
     54$primary_key = '<##>';
    5455
    5556// Loop through columns
Note: See TracChangeset for help on using the changeset viewer.