Skip to content

Commit

Permalink
- added item title to page title
Browse files Browse the repository at this point in the history
  • Loading branch information
ggoffy committed Jan 25, 2021
1 parent 8394af3 commit 8c68692
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
7 changes: 0 additions & 7 deletions class/Files/Sql/SqlFile.php
Expand Up @@ -191,13 +191,6 @@ private function getDatabaseFields($moduleDirname, $tableMid, $tableId, $tableNa
// Creation of database table
$ret = $this->getHeadDatabaseTable($moduleDirname, $tableName, $fieldsNumb);
$fieldName = $fields[$f]->getVar('field_name');



if ($fieldName == 'cat_created') {
echo "found";
}

$fieldType = $fields[$f]->getVar('field_type');
$fieldValue = \str_replace(''','', $fields[$f]->getVar('field_value')); //remove single quotes
$fieldAttribute = $fields[$f]->getVar('field_attribute');
Expand Down
9 changes: 7 additions & 2 deletions class/Files/User/UserPages.php
Expand Up @@ -146,6 +146,7 @@ private function getUserPagesList($moduleDirname, $tableName, $fieldId, $fieldMa
$ucfTableName = \ucfirst($tableName);
$stuTableName = \mb_strtoupper($tableName);
$ccFieldId = $this->getCamelCase($fieldId, false, true);
$ccFieldMain = $this->getCamelCase($fieldMain, false, true);
$stuModuleDirname = \mb_strtoupper($moduleDirname);

$ret = '';
Expand Down Expand Up @@ -173,9 +174,11 @@ private function getUserPagesList($moduleDirname, $tableName, $fieldId, $fieldMa
$ret .= $this->xc->getXcCriteriaSetLimit($critName, '$limit', $t);
$ret .= $this->xc->getXcHandlerAllClear($tableName . 'All', $tableName, '$' . $critName, $t);
$condIf = $this->pc->getPhpCodeArray($tableName, null, false, $t . "\t");
$condIf .= $this->xc->getXcEqualsOperator("\${$ccFieldMain}", "''",'', $t . "\t");
$condIf .= $this->pc->getPhpCodeCommentLine('Get All', $ucfTableName, $t . "\t");
$foreach = $this->xc->getXcGetValues($tableName, $tableName . '[$i]', 'i', false, $t . "\t\t");
$foreach .= $this->xc->getXcGetVar('keywords[$i]', "{$tableName}All[\$i]", $fieldMain, false, $t . "\t\t");
$foreach .= $this->xc->getXcGetVar($ccFieldMain, "{$tableName}All[\$i]", $fieldMain, false, $t . "\t\t");
$foreach .= $this->xc->getXcEqualsOperator('$keywords[$i]', "\${$ccFieldMain}",'', $t . "\t\t");
if ($tableRate) {
$itemId = $this->xc->getXcGetVar($ccFieldId, "{$tableName}All[\$i]", $fieldId, true);
$const = $this->xc->getXcGetConstants('TABLE_' . $stuTableName);
Expand All @@ -193,7 +196,9 @@ private function getUserPagesList($moduleDirname, $tableName, $fieldId, $fieldMa
$condIf .= $this->xc->getXcXoopsTplAssign('divideby', $divideby, true, $t . "\t");
$numbCol = $this->xc->getXcGetConfig('numb_col');
$condIf .= $this->xc->getXcXoopsTplAssign('numb_col', $numbCol, true, $t . "\t");

$stripTags = $this->pc->getPhpCodeStripTags('', "\${$ccFieldMain} . ' - ' . " . "\$GLOBALS['xoopsModule']->getVar('name')", true);
$condIf2 = $this->xc->getXcXoopsTplAssign('xoops_pagetitle', $stripTags, true, $t . "\t\t");
$condIf .= $this->pc->getPhpCodeConditions("'show' == \$op && '' != \${$ccFieldMain}", '', "", $condIf2, false, $t . "\t");
$ret .= $this->pc->getPhpCodeConditions("\${$tableName}Count", ' > ', '0', $condIf, false, $t);

return $ret;
Expand Down
1 change: 1 addition & 0 deletions docs/changelog.txt
Expand Up @@ -13,6 +13,7 @@
- fixed problem in XoopsConfirm (goffy)
- fixed missing default values in smarty in modulebuilder itself (mamba/goffy)
- fixed missing default values in smarty in created modules (mamba/goffy)
- added item title to page title (heyula/goffy)

<h5>3.04 Final [2020-11-11]</h5> Dev: XOOPS 2.5.11, PHP 7.4.5
<hr>
Expand Down

0 comments on commit 8c68692

Please sign in to comment.