Skip to content

Commit e808f14

Browse files
committed
Merge pull request #3 from mambax7/master
1.51 RC1
2 parents 9917960 + 7f95f84 commit e808f14

File tree

90 files changed

+2427
-2220
lines changed

Some content is hidden

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

90 files changed

+2427
-2220
lines changed

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# no backup files, editor temp
2+
*~
3+
\#*
4+
*.bak
5+
.idea/

.scrutinizer.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
checks:
2+
php:
3+
code_rating: true
4+
variable_existence: true
5+
useless_calls: true
6+
use_statement_alias_conflict: true
7+
unused_variables: true
8+
unused_properties: true
9+
unused_parameters: true
10+
unused_methods: true
11+
unreachable_code: true
12+
sql_injection_vulnerabilities: true
13+
security_vulnerabilities: true
14+
precedence_mistakes: true
15+
precedence_in_conditions: true
16+
parameter_non_unique: true
17+
no_property_on_interface: true
18+
no_non_implemented_abstract_methods: true
19+
deprecated_code_usage: true
20+
closure_use_not_conflicting: true
21+
closure_use_modifiable: true
22+
avoid_useless_overridden_methods: true
23+
avoid_conflicting_incrementers: true
24+
assignment_of_null_return: true
25+
verify_property_names: true
26+
verify_argument_usable_as_reference: true
27+
verify_access_scope_valid: true
28+
use_self_instead_of_fqcn: true
29+
too_many_arguments: true
30+
single_namespace_per_use: true
31+
return_doc_comment_if_not_inferrable: true
32+
return_doc_comments: true
33+
require_scope_for_methods: true
34+
require_scope_for_properties: true
35+
require_php_tag_first: true
36+
require_braces_around_control_structures: true
37+
psr2_control_structure_declaration: true
38+
psr2_switch_declaration: true
39+
psr2_class_declaration: true
40+
no_eval: true
41+
no_else_if_statements: true
42+
avoid_corrupting_byteorder_marks: true
43+
argument_type_checks: true
44+
php5_style_constructor: true
45+
parameter_doc_comments: true
46+
no_duplicate_arguments: true
47+
missing_arguments: true
48+
instanceof_class_exists: true
49+
foreach_traversable: true
50+
no_unnecessary_function_call_in_for_loop: true

.travis.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
language: php
2+
script:
3+
- phpunit
4+
php:
5+
- 5.3
6+
- 5.4
7+
- 5.5
8+
- 5.6

mymenus/admin/about.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* @package Mymenus
1616
* @since 1.0
1717
* @author trabis <lusopoemas@gmail.com>
18-
* @version $Id: about.php 12940 2015-01-21 17:33:38Z zyspec $
18+
* @version $Id: about.php
1919
*/
2020

2121
include_once __DIR__ . '/admin_header.php';

mymenus/admin/admin_footer.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
* @package Mytabs
1616
* @since 1.0
1717
* @author trabis <lusopoemas@gmail.com>
18-
* @version $Id: admin_footer.php 12940 2015-01-21 17:33:38Z zyspec $
18+
* @version $Id: admin_footer.php
1919
*/
2020

2121
echo "<div class='adminfooter'>\n"
22-
." <div class='txtcenter'>\n"
23-
." <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"
24-
." </div>\n"
25-
." " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n"
26-
."</div>\n";
22+
. " <div class='txtcenter'>\n"
23+
. " <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"
24+
. " </div>\n"
25+
. " " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n"
26+
. "</div>\n";
2727

2828
xoops_cp_footer();

mymenus/admin/admin_header.php

+39-20
Original file line numberDiff line numberDiff line change
@@ -15,34 +15,53 @@
1515
* @package Mymenus
1616
* @since 1.0
1717
* @author trabis <lusopoemas@gmail.com>
18-
* @version $Id: admin_header.php 0 2010-07-21 18:47:04Z trabis $
18+
* @version $Id: admin_header.php
1919
*/
2020

2121
include_once dirname(dirname(dirname(__DIR__))) . '/mainfile.php';
22-
include_once dirname(__DIR__) . '/include/common.php';
23-
22+
include_once $GLOBALS['xoops']->path('www/include/cp_functions.php');
2423
// Include xoops admin header
25-
include_once XOOPS_ROOT_PATH . '/include/cp_header.php';
24+
include_once $GLOBALS['xoops']->path('www/include/cp_header.php');
25+
include_once $GLOBALS['xoops']->path('www/class/xoopsformloader.php');
2626

27-
$pathIcon16 = XOOPS_URL . '/' . $mymenus->getModule()->getInfo('icons16');
28-
$pathIcon32 = XOOPS_URL . '/' . $mymenus->getModule()->getInfo('icons32');
29-
$pathModuleAdmin = XOOPS_ROOT_PATH . '/' . $mymenus->getModule()->getInfo('dirmoduleadmin');
30-
require_once $pathModuleAdmin . '/moduleadmin/moduleadmin.php';
27+
xoops_load('XoopsRequest');
3128

32-
// Load language files
33-
xoops_loadLanguage('admin', $mymenus->getModule()->dirname());
34-
xoops_loadLanguage('modinfo', $mymenus->getModule()->dirname());
35-
xoops_loadLanguage('main', $mymenus->getModule()->dirname());
29+
//$moduleDirName = $GLOBALS['xoopsModule']->getVar('dirname');
30+
include_once dirname(__DIR__) . '/include/common.php';
31+
//$mymenus = MymenusMymenus::getInstance($debug);
3632

37-
if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
38-
include_once(XOOPS_ROOT_PATH . '/class/template.php');
33+
$pathIcon16 = $GLOBALS['xoops']->url('www/' . $GLOBALS['xoopsModule']->getInfo('systemIcons16'));
34+
$pathIcon32 = $GLOBALS['xoops']->url('www/' . $GLOBALS['xoopsModule']->getInfo('systemIcons32'));
35+
$xoopsModuleAdminPath = $GLOBALS['xoops']->path('www/' . $GLOBALS['xoopsModule']->getInfo('dirmoduleadmin'));
36+
require_once "{$xoopsModuleAdminPath}/moduleadmin/moduleadmin.php";
37+
38+
39+
$myts =& MyTextSanitizer::getInstance();
40+
if (!isset($GLOBALS['xoopsTpl']) || !($GLOBALS['xoopsTpl'] instanceof XoopsTpl)) {
41+
include_once $GLOBALS['xoops']->path("/class/template.php");
3942
$xoopsTpl = new XoopsTpl();
4043
}
4144

45+
$GLOBALS['xoopsTpl']->assign('pathIcon16', $pathIcon16);
46+
$GLOBALS['xoopsTpl']->assign('pathIcon32', $pathIcon32);
47+
48+
// Load language files
49+
xoops_loadLanguage('admin', $mymenus->dirname);
50+
xoops_loadLanguage('modinfo', $mymenus->dirname);
51+
xoops_loadLanguage('main', $mymenus->dirname);
52+
4253
include_once $GLOBALS['xoops']->path('class/template.php');
43-
include_once $GLOBALS['xoops']->path('modules/mymenus/include/functions.php');
44-
include_once $GLOBALS['xoops']->path('modules/mymenus/class/registry.php');
45-
include_once $GLOBALS['xoops']->path('modules/mymenus/class/plugin.php');
54+
include_once $GLOBALS['xoops']->path("modules/{$mymenus->dirname}/include/functions.php");
55+
include_once $GLOBALS['xoops']->path("modules/{$mymenus->dirname}/class/registry.php");
56+
include_once $GLOBALS['xoops']->path("modules/{$mymenus->dirname}/class/plugin.php");
57+
58+
59+
//Module specific elements
60+
//include_once $GLOBALS['xoops']->path("modules/{$mymenus->dirname}/include/functions.php");
61+
//include_once $GLOBALS['xoops']->path("modules/{$mymenus->dirname}/include/config.php");
62+
63+
//Handlers
64+
//$XXXHandler =& xoops_getModuleHandler('XXX', $mymenus->dirname);
4665

4766
//$mymenusTpl = new XoopsTpl();
4867

@@ -57,9 +76,9 @@
5776
$indexAdmin = new ModuleAdmin();
5877
5978
include_once $GLOBALS['xoops']->path('class/template.php');
60-
include_once $GLOBALS['xoops']->path('modules/mymenus/include/functions.php');
61-
include_once $GLOBALS['xoops']->path('modules/mymenus/class/registry.php');
62-
include_once $GLOBALS['xoops']->path('modules/mymenus/class/plugin.php');
79+
include_once $GLOBALS['xoops']->path("modules/{$mymenus->dirname}/include/functions.php");
80+
include_once $GLOBALS['xoops']->path("modules/{$mymenus->dirname}/class/registry.php");
81+
include_once $GLOBALS['xoops']->path("modules/{$mymenus->dirname}/class/plugin.php");
6382
6483
$mymenusTpl = new XoopsTpl();
6584
if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {

mymenus/admin/index.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* @package Mymenus
1616
* @since 1.0
1717
* @author trabis <lusopoemas@gmail.com>
18-
* @version $Id: index.php 0 2010-07-21 18:47:04Z trabis $
18+
* @version $Id: index.php
1919
*/
2020

2121
$currentFile = basename(__FILE__);
@@ -28,4 +28,4 @@
2828
echo $indexAdmin->addNavigation('index.php');
2929
echo $indexAdmin->renderIndex();
3030

31-
include 'admin_footer.php';
31+
include __DIR__ . '/admin_footer.php';

0 commit comments

Comments
 (0)