Skip to content

Commit 74143be

Browse files
authored
Merge pull request #134 from mambax7/master
fixes
2 parents 6b7a6d0 + 316ec84 commit 74143be

109 files changed

Lines changed: 2260 additions & 3534 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ If you liked the tdmcreate module and thanks to the long process for giving the
1919
</p>
2020

2121
> **Note:** This repository contains the code of the tdmcreate module
22-
It's under development currently. If you want to build with developers this version of module or create a base modules, you can use the last version of this module at [Txmod Xoops Web Site](http://www.txmodxoops.org), and visit the main discussion forum at [XOOPS Web Site](http://xoops.org/modules/newbb/viewtopic.php?topic_id=76746) for more information.
22+
It's under development currently. If you want to build with developers this version of module or create a base modules, you can use the last version of this module at [Txmod XOOPS Web Site](http://www.txmodxoops.org), and visit the main discussion forum at [XOOPS Web Site](http://xoops.org/modules/newbb/viewtopic.php?topic_id=76746) for more information.
2323

2424
Clear version
2525

2626
# Require:
27-
- Xoops 2.5.8;
28-
- Xoops Admin 1.1;
27+
- XOOPS 2.5.8;
28+
- XOOPS Admin 1.2;
2929
- PHP 5.3 or high;
30-
- MySQL 5.5; -> Minimum Raccomanded Using InnoDB Version 5.1 or Later
30+
- MySQL 5.5; -> Minimum Recommended Using InnoDB Version 5.1 or Later
3131

3232
# Adding
3333
- Added: table_solename field in tables
@@ -40,11 +40,11 @@ Clear version
4040
# Info
4141
TDMCreate is a module that create other basic modules for XOOPS CMS.
4242

43-
Tested with xoops 2.5.7.(1,2) and 2.5.8 beta 1, you can not use it with earlier versions, unless because you don't fit some core files in the background and after some tests.
43+
Tested with XOOPS 2.5.7.(1,2) and 2.5.8 beta 1, you can not use it with earlier versions, unless because you don't fit some core files in the background and after some tests.
4444

45-
That is ahead xoops versions, and goes to 2.6.0, you should download xoops 2.5.7.2 and use with this latest version.
45+
That is ahead XOOPS versions, and goes to 2.6.0, you should download XOOPS 2.5.7.2 and use with this latest version.
4646

47-
Therefore recommended not to use tdmcreate 1.91, with previous versions of xoops 2.5.7
47+
Therefore recommended not to use tdmcreate 1.91, with previous versions of XOOPS 2.5.7
4848

4949
# System - Tests
5050
PHP = 5.4.31 - 5.5.15
@@ -53,7 +53,7 @@ MySQL = 5.6.20
5353

5454
Apache = 2.4.10
5555

56-
Xoops = 2.5.7.1 - 2.5.8
56+
XOOPS = 2.5.7.1 - 2.5.8
5757

5858
Codeception = 2.0.13
5959

admin/modules.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
117117
$uploader->fetchMedia($_POST['xoops_upload_file'][0]);
118118
if (!$uploader->upload()) {
119-
$errors = $uploader->getErrors();
119+
$errors =& $uploader->getErrors();
120120
redirect_header('javascript:history.go(-1)', 3, $errors);
121121
} else {
122122
$modulesObj->setVar('mod_image', $uploader->getSavedFileName());

class/addfiles.php

Lines changed: 33 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@
2323
* @version $Id: morefiles.php 13080 2015-06-12 10:12:32Z timgno $
2424
*/
2525
include __DIR__.'/autoload.php';
26-
/*
27-
* @Class TDMCreateMoreFiles
28-
* @extends XoopsObject
29-
*/
3026

3127
/**
3228
* Class TDMCreateMoreFiles.
@@ -47,7 +43,7 @@ class TDMCreateAddFiles extends XoopsObject
4743
*/
4844
private $settings;
4945

50-
/*
46+
/**
5147
* @public function constructor class
5248
* @param null
5349
*/
@@ -76,12 +72,10 @@ public function __call($method, $args)
7672
return $this->getVar($method, $arg);
7773
}
7874

79-
/*
75+
/**
8076
* @static function getInstance
8177
* @param null
82-
*/
83-
/**
84-
* @return TDMCreateMoreFiles
78+
* @return TDMCreateAddFiles
8579
*/
8680
public static function getInstance()
8781
{
@@ -93,12 +87,9 @@ public static function getInstance()
9387
return $instance;
9488
}
9589

96-
/*
90+
/**
9791
* @public function getFormMoreFiles
9892
* @param mixed $action
99-
*/
100-
/**
101-
* @param bool $action
10293
*
10394
* @return XoopsThemeForm
10495
*/
@@ -144,6 +135,10 @@ public function getFormAddFiles($action = false)
144135

145136
/**
146137
* Get AddFiles Values.
138+
* @param null $keys
139+
* @param null $format
140+
* @param null $maxDepth
141+
* @return array
147142
*/
148143
public function getAddFilesValues($keys = null, $format = null, $maxDepth = null)
149144
{
@@ -159,24 +154,17 @@ public function getAddFilesValues($keys = null, $format = null, $maxDepth = null
159154
}
160155
}
161156

162-
/*
163-
* @Class TDMCreateMoreFilesHandler
164-
* @extends XoopsPersistableObjectHandler
165-
*/
166157

167158
/**
168159
* Class TDMCreateMoreFilesHandler.
169160
*/
170161
class TDMCreateAddFilesHandler extends XoopsPersistableObjectHandler
171162
{
172-
/*
173-
* @public function constructor class
174-
* @param mixed $db
175-
*/
176163
/**
177-
* @param null|object $db
164+
* @public function constructor class
165+
* @param null|XoopsDatabase $db
178166
*/
179-
public function __construct(&$db)
167+
public function __construct(XoopsDatabase $db)
180168
{
181169
parent::__construct($db, 'tdmcreate_addfiles', 'tdmcreateaddfiles', 'file_id', 'file_name');
182170
}
@@ -236,6 +224,11 @@ public function &insert(&$field, $force = false)
236224

237225
/**
238226
* Get Count AddFiles.
227+
* @param int $start
228+
* @param int $limit
229+
* @param string $sort
230+
* @param string $order
231+
* @return int
239232
*/
240233
public function getCountAddFiles($start = 0, $limit = 0, $sort = 'file_id ASC, file_name', $order = 'ASC')
241234
{
@@ -247,6 +240,11 @@ public function getCountAddFiles($start = 0, $limit = 0, $sort = 'file_id ASC, f
247240

248241
/**
249242
* Get All AddFiles.
243+
* @param int $start
244+
* @param int $limit
245+
* @param string $sort
246+
* @param string $order
247+
* @return array
250248
*/
251249
public function getAllAddFiles($start = 0, $limit = 0, $sort = 'file_id ASC, file_name', $order = 'ASC')
252250
{
@@ -258,6 +256,12 @@ public function getAllAddFiles($start = 0, $limit = 0, $sort = 'file_id ASC, fil
258256

259257
/**
260258
* Get All AddFiles By Module Id.
259+
* @param $modId
260+
* @param int $start
261+
* @param int $limit
262+
* @param string $sort
263+
* @param string $order
264+
* @return array
261265
*/
262266
public function getAllAddFilesByModuleId($modId, $start = 0, $limit = 0, $sort = 'file_id ASC, file_name', $order = 'ASC')
263267
{
@@ -270,6 +274,12 @@ public function getAllAddFilesByModuleId($modId, $start = 0, $limit = 0, $sort =
270274

271275
/**
272276
* Get AddFiles Criteria.
277+
* @param $criteriaAddFiles
278+
* @param $start
279+
* @param $limit
280+
* @param $sort
281+
* @param $order
282+
* @return
273283
*/
274284
private function getAddFilesCriteria($criteriaAddFiles, $start, $limit, $sort, $order)
275285
{

class/building.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public function copyDir($src, $dst)
108108
$dir = opendir($src);
109109
@mkdir($dst);
110110
while (false !== ($file = readdir($dir))) {
111-
if (($file != '.') && ($file != '..')) {
111+
if (($file !== '.') && ($file !== '..')) {
112112
if (is_dir($src.'/'.$file)) {
113113
// Copy the directory itself
114114
self::copyDir($src.'/'.$file, $dst.'/'.$file);

class/fieldattributes.php

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* @version $Id: 1.91 fieldattributes.php 13027 2015-02-14 12:18:10Z timgno $
2323
*/
2424

25-
/*
25+
/**
2626
* @Class TDMCreateFieldattributes
2727
* @extends XoopsObject
2828
*/
@@ -32,7 +32,7 @@
3232
*/
3333
class TDMCreateFieldattributes extends XoopsObject
3434
{
35-
/*
35+
/**
3636
* @public function constructor class
3737
* @param null
3838
*/
@@ -44,12 +44,10 @@ public function __construct()
4444
$this->initVar('fieldattribute_value', XOBJ_DTYPE_TXTBOX);
4545
}
4646

47-
/*
47+
/**
4848
* @static function getInstance
4949
* @param null
50-
*/
51-
/**
52-
* @return TDMCreateFieldElements
50+
* @return TDMCreateFieldattributes
5351
*/
5452
public static function getInstance()
5553
{
@@ -63,6 +61,10 @@ public static function getInstance()
6361

6462
/**
6563
* Get Values.
64+
* @param null $keys
65+
* @param null $format
66+
* @param null $maxDepth
67+
* @return array
6668
*/
6769
public function getValuesFieldattributes($keys = null, $format = null, $maxDepth = null)
6870
{
@@ -76,13 +78,9 @@ public function getValuesFieldattributes($keys = null, $format = null, $maxDepth
7678
}
7779
}
7880

79-
/*
80-
* @Class TDMCreateFieldattributesHandler
81-
* @extends XoopsPersistableObjectHandler
82-
*/
8381

8482
/**
85-
* Class TDMCreateFieldattributesHandler.
83+
* Class TDMCreateFieldattributesHandler
8684
*/
8785
class TDMCreateFieldattributesHandler extends XoopsPersistableObjectHandler
8886
{

class/fieldelements.php

Lines changed: 37 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,13 @@
2222
* @version $Id: 1.91 fieldelements.php 11297 2014-03-24 09:11:10Z timgno $
2323
*/
2424

25-
/*
26-
* @Class TDMCreateFieldElements
27-
* @extends XoopsObject
28-
*/
2925

3026
/**
3127
* Class TDMCreateFieldElements.
3228
*/
3329
class TDMCreateFieldElements extends XoopsObject
3430
{
35-
/*
31+
/**
3632
* @public function constructor class
3733
* @param null
3834
*/
@@ -59,11 +55,9 @@ public function __call($method, $args)
5955
return $this->getVar($method, $arg);
6056
}
6157

62-
/*
58+
/**
6359
* @static function getInstance
6460
* @param null
65-
*/
66-
/**
6761
* @return TDMCreateFieldElements
6862
*/
6963
public static function getInstance()
@@ -78,6 +72,10 @@ public static function getInstance()
7872

7973
/**
8074
* Get Values.
75+
* @param null $keys
76+
* @param null $format
77+
* @param null $maxDepth
78+
* @return array
8179
*/
8280
public function getValuesFieldElements($keys = null, $format = null, $maxDepth = null)
8381
{
@@ -93,30 +91,28 @@ public function getValuesFieldElements($keys = null, $format = null, $maxDepth =
9391
}
9492
}
9593

96-
/*
97-
* @Class TDMCreateFieldElementsHandler
98-
* @extends XoopsPersistableObjectHandler
99-
*/
10094

10195
/**
10296
* Class TDMCreateFieldElementsHandler.
10397
*/
10498
class TDMCreateFieldElementsHandler extends XoopsPersistableObjectHandler
10599
{
106-
/*
107-
* @public function constructor class
108-
* @param mixed $db
109-
*/
110100
/**
111-
* @param null|object $db
101+
* @public function constructor class
102+
* @param null|XoopsDatabase $db
112103
*/
113-
public function __construct(&$db)
104+
public function __construct(XoopsDatabase $db)
114105
{
115106
parent::__construct($db, 'tdmcreate_fieldelements', 'tdmcreatefieldelements', 'fieldelement_id', 'fieldelement_name');
116107
}
117108

118109
/**
119110
* Get Count Fields.
111+
* @param int $start
112+
* @param int $limit
113+
* @param string $sort
114+
* @param string $order
115+
* @return int
120116
*/
121117
public function getCountFieldElements($start = 0, $limit = 0, $sort = 'fieldelement_id ASC, fieldelement_name', $order = 'ASC')
122118
{
@@ -128,6 +124,11 @@ public function getCountFieldElements($start = 0, $limit = 0, $sort = 'fieldelem
128124

129125
/**
130126
* Get Objects Fields.
127+
* @param int $start
128+
* @param int $limit
129+
* @param string $sort
130+
* @param string $order
131+
* @return array
131132
*/
132133
public function getObjectsFieldElements($start = 0, $limit = 0, $sort = 'fieldelement_id ASC, fieldelement_name', $order = 'ASC')
133134
{
@@ -139,6 +140,11 @@ public function getObjectsFieldElements($start = 0, $limit = 0, $sort = 'fieldel
139140

140141
/**
141142
* Get All Fields.
143+
* @param int $start
144+
* @param int $limit
145+
* @param string $sort
146+
* @param string $order
147+
* @return array
142148
*/
143149
public function getAllFieldElements($start = 0, $limit = 0, $sort = 'fieldelement_id ASC, fieldelement_name', $order = 'ASC')
144150
{
@@ -150,6 +156,13 @@ public function getAllFieldElements($start = 0, $limit = 0, $sort = 'fieldelemen
150156

151157
/**
152158
* Get All Fields By Module & Table Id.
159+
* @param $modId
160+
* @param $tabId
161+
* @param int $start
162+
* @param int $limit
163+
* @param string $sort
164+
* @param string $order
165+
* @return array
153166
*/
154167
public function getAllFieldElementsByModuleAndTableId($modId, $tabId, $start = 0, $limit = 0, $sort = 'fieldelement_id ASC, fieldelement_name', $order = 'ASC')
155168
{
@@ -163,6 +176,12 @@ public function getAllFieldElementsByModuleAndTableId($modId, $tabId, $start = 0
163176

164177
/**
165178
* Get FieldElements Criteria.
179+
* @param $crFieldElemsCriteria
180+
* @param $start
181+
* @param $limit
182+
* @param $sort
183+
* @param $order
184+
* @return
166185
*/
167186
private function getFieldElementsCriteria($crFieldElemsCriteria, $start, $limit, $sort, $order)
168187
{

0 commit comments

Comments
 (0)