Skip to content

Commit 3208686

Browse files
committed
code cleaning
1 parent 5664e3f commit 3208686

33 files changed

Lines changed: 33 additions & 2844 deletions

class/Files/CreateXoopsCode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1773,7 +1773,7 @@ public function getXcCommonPagesDelete($language, $tableName, $tableSoleName, $f
17731773
$ccFieldId = $cf->getCamelCase($fieldId, false, true);
17741774
$ccFieldMain = $cf->getCamelCase($fieldMain, false, true);
17751775

1776-
$ret = $xc->getXcHandlerGet($tableName, $ccFieldId, 'Obj', $tableName . 'Handler', '', $t);
1776+
$ret = $xc->getXcHandlerGet($tableName, $ccFieldId, 'Obj', $tableName . 'Handler', false, $t);
17771777
$ret .= $xc->getXcGetVar($ccFieldMain, "{$tableName}Obj", $fieldMain, false, $t);
17781778
$reqOk = "_REQUEST['ok']";
17791779
$isset = $pc->getPhpCodeIsset($reqOk);

class/Files/Language/LanguageMailTpl.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -371,16 +371,6 @@ public function render()
371371
$table = $this->getTable();
372372
$moduleDirname = $module->getVar('mod_dirname');
373373
$tableSoleName = $table->getVar('table_solename');
374-
//$stuTableSoleName = mb_strtoupper($tableSoleName);
375-
$fieldMain = '';
376-
$fields = $this->getTableFields($table->getVar('table_mid'), $table->getVar('table_id'));
377-
foreach (array_keys($fields) as $f) {
378-
$fieldName = $fields[$f]->getVar('field_name');
379-
if (1 == $fields[$f]->getVar('field_main')) {
380-
$fieldMain = $fieldName; // fieldMain = fields parameters main field
381-
}
382-
}
383-
//$stuFieldMain = mb_strtoupper($fieldMain);
384374

385375
$line = '------------------------------------------------------------------';
386376
$content = '';

class/Files/Language/LanguageModinfo.php

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,6 @@ private function getLanguageConfig($language, $tables)
265265
// $usePermissions = false;
266266
foreach (array_keys($tables) as $i) {
267267
$fields = $this->getTableFields($tables[$i]->getVar('table_mid'), $tables[$i]->getVar('table_id'));
268-
$ucfTablename = ucfirst($tables[$i]->getVar('table_name'));
269-
//$stuTablename = mb_strtoupper($ucfTablename);
270268
foreach (array_keys($fields) as $f) {
271269
$fieldElement = $fields[$f]->getVar('field_element');
272270
if (3 == $fieldElement) {
@@ -285,7 +283,6 @@ private function getLanguageConfig($language, $tables)
285283
if (0 != $tables[$i]->getVar('table_tag')) {
286284
$useTag = true;
287285
}
288-
// if (0 != $tables[$i]->getVar('table_permissions')) {$usePermissions = true;}
289286
}
290287
if ($fieldEditor) {
291288
$ret .= $df->getDefine($language, 'EDITOR_ADMIN', 'Editor admin');
@@ -297,12 +294,6 @@ private function getLanguageConfig($language, $tables)
297294
}
298295
$ret .= $df->getDefine($language, 'KEYWORDS', 'Keywords');
299296
$ret .= $df->getDefine($language, 'KEYWORDS_DESC', 'Insert here the keywords (separate by comma)');
300-
/*if (usePermissions) {
301-
$ret .= $df->getDefine($language, "GROUPS", "Groups");
302-
$ret .= $df->getDefine($language, "GROUPS_DESC", "Groups to have permissions");
303-
$ret .= $df->getDefine($language, "ADMIN_GROUPS", "Admin Groups");
304-
$ret .= $df->getDefine($language, "ADMIN_GROUPS_DESC", "Admin Groups to have permissions access");
305-
}*/
306297

307298
if ($fieldImage || $fieldFile) {
308299
$ret .= $df->getDefine($language, 'SIZE_MB', 'MB');
@@ -316,7 +307,6 @@ private function getLanguageConfig($language, $tables)
316307
$ret .= $df->getDefine($language, 'MAXWIDTH_IMAGE_DESC', 'Set the max width which is allowed for uploading images (in pixel)<br>0 means that images keep original size<br>If original image is smaller the image will be not enlarged');
317308
$ret .= $df->getDefine($language, 'MAXHEIGHT_IMAGE', 'Max height image');
318309
$ret .= $df->getDefine($language, 'MAXHEIGHT_IMAGE_DESC', 'Set the max height which is allowed for uploading images (in pixel)<br>0 means that images keep original size<br>If original image is smaller the image will be not enlarged');
319-
//MB define
320310
}
321311
if ($fieldFile) {
322312
$ret .= $df->getDefine($language, 'MAXSIZE_FILE', 'Max size file');
@@ -505,7 +495,8 @@ public function render()
505495
$tableNotifications = [];
506496
$tablePermissions = [];
507497
$notifTable = '';
508-
$tableBroken = 0;
498+
//$tableBroken = 0;
499+
$tableBrokens = [];
509500
$tableComments = [];
510501
foreach (array_keys($tables) as $t) {
511502
$tableName = $tables[$t]->getVar('table_name');

class/Files/Templates/Admin/TemplatesAdminBroken.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,12 @@ private function getTemplatesAdminBrokenTable($tableName, $tableSoleName, $langu
164164

165165
/**
166166
* @private function getTemplatesAdminBrokenList
167-
* @param string $moduleDirname
168167
* @param $table
169168
* @param string $language
170169
* @param string $t
171170
* @return string
172171
*/
173-
private function getTemplatesAdminBrokenList($moduleDirname, $table, $language, $t = '')
172+
private function getTemplatesAdminBrokenList($table, $language, $t = '')
174173
{
175174
$hc = Modulebuilder\Files\CreateHtmlCode::getInstance();
176175
$sc = Modulebuilder\Files\CreateSmartyCode::getInstance();
@@ -233,7 +232,7 @@ public function render()
233232
$content = $this->getTemplatesAdminBrokenHeader($moduleDirname);
234233
foreach ($tables as $table) {
235234
if (1 === (int)$table->getVar('table_broken')) {
236-
$content .= $this->getTemplatesAdminBrokenList($moduleDirname, $table, $language, "\t");
235+
$content .= $this->getTemplatesAdminBrokenList($table, $language, "\t");
237236
}
238237
}
239238
$content .= $this->getTemplatesAdminBrokenFooter($moduleDirname);

class/Files/Templates/Admin/TemplatesAdminPages.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ public static function getInstance()
5757

5858
/**
5959
* @public function write
60-
* @param string $module
61-
* @param string $table
62-
* @param $filename
60+
* @param $module
61+
* @param $table
62+
* @param string $filename
6363
*/
6464
public function write($module, $table, $filename)
6565
{
@@ -219,7 +219,7 @@ private function getTemplatesAdminPagesTableTBody($moduleDirname, $tableName, $t
219219
* @param string $tableName
220220
* @param $tableSoleName
221221
* @param $tableAutoincrement
222-
* @param string $fields
222+
* @param $fields
223223
* @param string $language
224224
* @return string
225225
*/
@@ -238,7 +238,7 @@ private function getTemplatesAdminPagesTable($moduleDirname, $tableName, $tableS
238238
* @param string $tableName
239239
* @param $tableSoleName
240240
* @param $tableAutoincrement
241-
* @param string $fields
241+
* @param $fields
242242
* @param string $language
243243
* @return string
244244
*/

class/Files/Templates/User/Defstyle/Breadcrumbs.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public static function getInstance()
5757

5858
/**
5959
* @public function write
60-
* @param string $module
60+
* @param $module
6161
* @param string $filename
6262
*/
6363
public function write($module, $filename)

class/Files/Templates/User/Defstyle/Categories.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ public static function getInstance()
5757

5858
/**
5959
* @public function write
60-
* @param string $module
61-
* @param string $table
60+
* @param $module
61+
* @param $table
6262
* @param string $filename
6363
*/
6464
public function write($module, $table, $filename)

class/Files/Templates/User/Defstyle/CategoriesList.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ public static function getInstance()
5757

5858
/**
5959
* @public function write
60-
* @param string $module
61-
* @param string $table
60+
* @param $module
61+
* @param $table
6262
* @param string $filename
6363
*/
6464
public function write($module, $table, $filename)

class/Files/Templates/User/Defstyle/Footer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public static function getInstance()
6262

6363
/**
6464
* @public function write
65-
* @param string $module
65+
* @param $module
6666
* @param mixed $table
6767
* @param string $filename
6868
*/

class/Files/Templates/User/Defstyle/Header.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public static function getInstance()
6464

6565
/**
6666
* @public function write
67-
* @param string $module
67+
* @param $module
6868
* @param string $filename
6969
*/
7070
public function write($module, $filename)

0 commit comments

Comments
 (0)