Skip to content

Commit

Permalink
Merge pull request #9 from mambax7/master
Browse files Browse the repository at this point in the history
Alpha 4
  • Loading branch information
mambax7 authored May 11, 2020
2 parents 0cad66a + 4ed9159 commit 3cbd87f
Show file tree
Hide file tree
Showing 504 changed files with 801 additions and 30,631 deletions.
8 changes: 4 additions & 4 deletions class/Files/Classes/ClassFormElements.php
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ private function getXoopsFormUploadImage($language, $moduleDirname, $tableName,
$formHidden = $cxc->getClassXoopsFormHidden('', $fieldName, $ccFieldName, true, true, $t, true);
$contElse = $cxc->getClassAddElement('imageTray', $formHidden, $t . "\t");
$ret .= $pc->getPhpCodeConditions('$permissionUpload', null, null, $contIf, $contElse, "\t\t");
$ret .= $cxc->getClassAddElement('form', "\$imageTray, {$required}", $t);
$ret .= $cxc->getClassAddElement('form', "\$imageTray {$required}", $t);

return $ret;
}
Expand Down Expand Up @@ -501,7 +501,7 @@ private function getXoopsFormSelectBox($language, $tableName, $fieldName, $requi
$ucfTableName = ucfirst($tableName);
$ccFieldName = $tf->getCamelCase($fieldName, false, true);
$t = "\t\t";
$ret = $pc->getPhpCodeCommentLine($ucfTableName, 'handler', $t);
$ret = $pc->getPhpCodeCommentLine($ucfTableName, 'Handler', $t);
$ret .= $xc->getXcHandlerLine($tableName, $t);
$ret .= $pc->getPhpCodeCommentLine('Form', 'Select ' . $ccFieldName, $t);
$ret .= $cxc->getClassXoopsFormSelect($ccFieldName . 'Select', $language, $fieldName, "this->getVar('{$fieldName}')", null, '', false, $t);
Expand Down Expand Up @@ -764,7 +764,7 @@ private function getXoopsFormSelectCombo($language, $moduleDirname, $tableName,
$ccFieldName = $tf->getCamelCase($fieldName, false, true);
$languageShort = substr($language, 0, 4) . mb_strtoupper($moduleDirname) . '_';
$t = "\t\t";
$ret = $pc->getPhpCodeCommentLine($ucfTableName, 'handler', $t);
$ret = $pc->getPhpCodeCommentLine($ucfTableName, 'Handler', $t);
$ret .= $xc->getXcHandlerLine($tableName, $t);
$ret .= $pc->getPhpCodeCommentLine('Form', 'Select ' . $ccFieldName, $t);
$ret .= $cxc->getClassXoopsFormSelect($ccFieldName . 'Select', $language, $fieldName, "this->getVar('{$fieldName}')", '5', '', false, $t);
Expand Down Expand Up @@ -908,7 +908,7 @@ public function renderElements()
}
$rpFieldName = $tf->getRightString($fieldName);
$language = $languageFunct . mb_strtoupper($tableSoleName) . '_' . mb_strtoupper($rpFieldName);
$required = (1 == $fields[$f]->getVar('field_required')) ? ', true' : '';
$required = (1 == $fields[$f]->getVar('field_required')) ? ', true' : ' ';

$fieldElements = $tc->getHandler('Fieldelements')->get($fieldElement);
$fieldElementId[] = $fieldElements->getVar('fieldelement_id');
Expand Down
12 changes: 6 additions & 6 deletions class/Files/CreateArchitecture.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public function setBaseFoldersFiles($module)
$this->makeDirAndCopyFile($k, $v, 'index.html');
}
//Copy the logo of the module
$modImage = str_replace(' ', '', mb_strtolower($module->getVar('mod_image')));
$modImage = str_replace(' ', '', $module->getVar('mod_image'));
$targetImage = 'logoModule.png';
$this->copyFile('assets/images', TDMC_UPLOAD_IMGMOD_PATH . '/' . $modImage, $targetImage);

Expand Down Expand Up @@ -291,7 +291,7 @@ public function setFilesToBuilding($module)
if (1 === (int)$tables[$t]->getVar('table_admin') || 1 === (int)$tables[$t]->getVar('table_user')) {
// Class Files
$classFiles = Modulebuilder\Files\Classes\ClassHandlerFiles::getInstance();
$classFiles->write($module, $table, $tables, ucfirst($tableName) . 'handler.php');
$classFiles->write($module, $table, $tables, ucfirst($tableName) . 'Handler.php');
$ret[] = $classFiles->render();
}
// Creation of user files
Expand All @@ -318,11 +318,11 @@ public function setFilesToBuilding($module)
$ret[] = $userTemplatesPagesList->render();
if (1 === (int)$tables[$t]->getVar('table_category')) {
// User List Templates File
$userTemplatesCategories = Templates\User\Categories::getInstance();
$userTemplatesCategories = Templates\User\Defstyle\Categories::getInstance();
$userTemplatesCategories->write($module, $table, $moduleDirname . '_' . $tableName . '_cat.tpl');
$ret[] = $userTemplatesCategories->render();
// User List Templates File
$userTemplatesCategoriesList = Templates\User\CategoriesList::getInstance();
$userTemplatesCategoriesList = Templates\User\Defstyle\CategoriesList::getInstance();
$userTemplatesCategoriesList->write($module, $table, $moduleDirname . '_' . $tableName . '_cat_list' . '.tpl');
$ret[] = $userTemplatesCategoriesList->render();
}
Expand All @@ -345,8 +345,8 @@ public function setFilesToBuilding($module)

// Creation of classhandlers
$classSpecialFiles = Modulebuilder\Files\Classes\ClassSpecialFiles::getInstance();
$classSpecialFiles->write($module, '', $permTables, ucfirst('permissionshandler') . '.php');
$classSpecialFiles->className = 'Permissionshandler';
$classSpecialFiles->write($module, '', $permTables, ucfirst('PermissionsHandler') . '.php');
$classSpecialFiles->className = 'PermissionsHandler';
$ret[] = $classSpecialFiles->renderPermissionsHandler();

}
Expand Down
2 changes: 1 addition & 1 deletion class/Files/Includes/IncludeCommon.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ private function getCommonCode($module)
$replace = $xc->getXcEqualsOperator('$copyright', '"' . $anchor . '"');
$ret .= str_replace("\n", '', $replace) . PHP_EOL;
$ret .= $pc->getPhpCodeIncludeDir('XOOPS_ROOT_PATH', 'class/xoopsrequest', true);
$ret .= $pc->getPhpCodeIncludeDir("{$stuModuleDirname}_PATH", 'class/helper', true);
// $ret .= $pc->getPhpCodeIncludeDir("{$stuModuleDirname}_PATH", 'class/helper', true);
$ret .= $pc->getPhpCodeIncludeDir("{$stuModuleDirname}_PATH", 'include/functions', true);

return $ret;
Expand Down
2 changes: 1 addition & 1 deletion class/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function getHandler($name)
$db = \XoopsDatabaseFactory::getDatabaseConnection();
$helper = self::getInstance();
$ret = new $class($db, $helper);
$this->addLog("Getting handler '{$name}'");
$this->addLog("Getting Handler '{$name}'");

return $ret;
}
Expand Down
229 changes: 0 additions & 229 deletions class/helper0.php

This file was deleted.

11 changes: 11 additions & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
<h5>3.03 Alpha 4 [2020-05-11]</h5> Dev: XOOPS 2.5.11, PHP 7.4.5
<hr>
- missing folder name (mamba)
- changed date integer to 11 (mamba)
- fix removed extra comma in generated FormUploadImage code (mamba)
- added schema (mamba)
- renamed "handler" to "Handler" in generated code (heyula/mamba)
- removed call to include Helper.php file (mamba)
- fix copying logo file (mamba)


<h5>3.03 Alpha 3 [WORK IN PROGRESS - NOT RELEASED]</h5> Dev: XOOPS 2.5.11, PHP 7.4.5
<hr>
- fix class names to case-sensitive (heyula/mamba)
Expand Down
Loading

0 comments on commit 3cbd87f

Please sign in to comment.