Skip to content

Commit 22e48ac

Browse files
committed
- fixed bug with ENUM
1 parent 09f45ed commit 22e48ac

4 files changed

Lines changed: 107 additions & 2 deletions

File tree

class/Files/Sql/SqlFile.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,10 @@ private function getDatabaseFields($moduleDirname, $tableMid, $tableId, $tableNa
179179
$ret = $this->getHeadDatabaseTable($moduleDirname, $tableName, $fieldsNumb);
180180
$fieldName = $fields[$f]->getVar('field_name');
181181
$fieldType = $fields[$f]->getVar('field_type');
182-
$fieldValue = $fields[$f]->getVar('field_value');
182+
$fieldValue = str_replace(''','', $fields[$f]->getVar('field_value')); //remove single quotes
183183
$fieldAttribute = $fields[$f]->getVar('field_attribute');
184184
$fieldNull = $fields[$f]->getVar('field_null');
185-
$fieldDefault = $fields[$f]->getVar('field_default');
185+
$fieldDefault = str_replace(''','', $fields[$f]->getVar('field_default')); //remove single quotes
186186
$fieldKey = $fields[$f]->getVar('field_key');
187187
if ($fieldType > 1) {
188188
$fType = $helper->getHandler('Fieldtype')->get($fieldType);

docs/changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
- implementation new xoops_confirm - step 1 (goffy)
2727
- transfered class::getInstance() to class _construct (mamba/goffy)
2828
- code documentation cleaning (goffy)
29+
- fixed bug with ENUM (mamba/goffy)
2930

3031
<h5>3.03 Alpha 3 [WORK IN PROGRESS - NOT RELEASED]</h5> Dev: XOOPS 2.5.11, PHP 7.4.5
3132
<hr>
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<!-- Header -->
2+
<{includeq file="db:modulebuilder_header.tpl"}>
3+
<!-- Display mymodule list -->
4+
<{if $mymodule_list}>
5+
<table class='outer width100'>
6+
<tr>
7+
<th class='center'><{$smarty.const._AM_MODULEBUILDER_FILE_ID}></th>
8+
<th class='center'><{$smarty.const._AM_MODULEBUILDER_FILE_MID_LIST}></th>
9+
<th class='center'><{$smarty.const._AM_MODULEBUILDER_FILE_NAME_LIST}></th>
10+
<th class='center'><{$smarty.const._AM_MODULEBUILDER_FILE_EXTENSION_LIST}></th>
11+
<th class='center'><{$smarty.const._AM_MODULEBUILDER_FILE_INFOLDER_LIST}></th>
12+
<th class='center width5'><{$smarty.const._AM_MODULEBUILDER_FORM_ACTION}></th>
13+
</tr>
14+
<{foreach item=file from=$mymodule_list key=file_id}>
15+
<tr id="file<{$file.id}>" class="mymodule">
16+
<td class='center bold width5'><{$file.id}></td>
17+
<td class='center bold'><{$file.mid}></td>
18+
<td class='center bold green'><{$file.name}></td>
19+
<td class='center'><{$file.extension}></td>
20+
<td class='center'><{$file.infolder}></td>
21+
<td class='xo-actions txtcenter width5'>
22+
<a href="addmymodule.php?op=edit&amp;file_id=<{$file.id}>" title="<{$smarty.const._EDIT}>">
23+
<img src="<{xoModuleIcons16 edit.png}>" alt="<{$smarty.const._EDIT}>"/>
24+
</a>
25+
<a href="addmymodule.php?op=delete&amp;file_id=<{$file.id}>" title="<{$smarty.const._DELETE}>">
26+
<img src="<{xoModuleIcons16 delete.png}>" alt="<{$smarty.const._DELETE}>"/>
27+
</a>
28+
</td>
29+
</tr>
30+
<{/foreach}>
31+
</table>
32+
<br/>
33+
<br/>
34+
<!-- Display mymodule navigation -->
35+
<div class="clear">&nbsp;</div>
36+
<{if $pagenav}>
37+
<div class="xo-pagenav floatright"><{$pagenav}></div>
38+
<div class="clear spacer"></div>
39+
<{/if}>
40+
<{else}> <!-- Display file images on edit page -->
41+
<!-- Display file form (add,edit) -->
42+
<{if $form}>
43+
<div class="spacer"><{$form}></div>
44+
<{/if}>
45+
<{/if}>
46+
<{if $error}>
47+
<div class="errorMsg">
48+
<strong><{$error}></strong>
49+
</div>
50+
<{/if}>
51+
<!-- Footer -->
52+
<{includeq file="db:modulebuilder_footer.tpl"}>
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<!-- Header -->
2+
<{includeq file="db:modulebuilder_header.tpl"}>
3+
<!-- Display mymodule list -->
4+
<{if $mymodule_list}>
5+
<table class='outer width100'>
6+
<tr>
7+
<th class='center'><{$smarty.const._AM_MODULEBUILDER_FILE_ID}></th>
8+
<th class='center'><{$smarty.const._AM_MODULEBUILDER_FILE_MID_LIST}></th>
9+
<th class='center'><{$smarty.const._AM_MODULEBUILDER_FILE_INFOLDER_LIST}></th>
10+
<th class='center'><{$smarty.const._AM_MODULEBUILDER_FILE_NAME_LIST}></th>
11+
<th class='center'><{$smarty.const._AM_MODULEBUILDER_FILE_EXTENSION_LIST}></th>
12+
<th class='center width5'><{$smarty.const._AM_MODULEBUILDER_FORM_ACTION}></th>
13+
</tr>
14+
<{foreach item=file from=$mymodule_list key=file_id}>
15+
<tr id="file<{$file.id}>" class="mymodule">
16+
<td class='center bold width5'><{$file.id}></td>
17+
<td class='center bold'><{$file.mid}></td>
18+
<td class='center bold blue'><{$file.infolder}></td>
19+
<td class='center bold green'><{$file.name}></td>
20+
<td class='center bold red'><{$file.extension}></td>
21+
<td class='xo-actions txtcenter width5'>
22+
<a href="moremymodule.php?op=edit&amp;file_id=<{$file.id}>" title="<{$smarty.const._EDIT}>">
23+
<img src="<{xoModuleIcons16 edit.png}>" alt="<{$smarty.const._EDIT}>"/>
24+
</a>
25+
<a href="moremymodule.php?op=delete&amp;file_id=<{$file.id}>" title="<{$smarty.const._DELETE}>">
26+
<img src="<{xoModuleIcons16 delete.png}>" alt="<{$smarty.const._DELETE}>"/>
27+
</a>
28+
</td>
29+
</tr>
30+
<{/foreach}>
31+
</table>
32+
<br/>
33+
<br/>
34+
<!-- Display mymodule navigation -->
35+
<div class="clear">&nbsp;</div>
36+
<{if $pagenav}>
37+
<div class="xo-pagenav floatright"><{$pagenav}></div>
38+
<div class="clear spacer"></div>
39+
<{/if}>
40+
<{else}> <!-- Display file images on edit page -->
41+
<!-- Display file form (add,edit) -->
42+
<{if $form}>
43+
<div class="spacer"><{$form}></div>
44+
<{/if}>
45+
<{/if}>
46+
<{if $error}>
47+
<div class="errorMsg">
48+
<strong><{$error}></strong>
49+
</div>
50+
<{/if}>
51+
<!-- Footer -->
52+
<{includeq file="db:modulebuilder_footer.tpl"}>

0 commit comments

Comments
 (0)