Skip to content

Commit 1218f43

Browse files
committed
Merge pull request #3 from mambax7/master
Adding GPL Label
2 parents 831cd5d + b07f434 commit 1218f43

24 files changed

Lines changed: 117 additions & 20 deletions

.gitattributes

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
# Custom for Visual Studio
5+
*.cs diff=csharp
6+
7+
# Standard to msysgit
8+
*.doc diff=astextplain
9+
*.DOC diff=astextplain
10+
*.docx diff=astextplain
11+
*.DOCX diff=astextplain
12+
*.dot diff=astextplain
13+
*.DOT diff=astextplain
14+
*.pdf diff=astextplain
15+
*.PDF diff=astextplain
16+
*.rtf diff=astextplain
17+
*.RTF diff=astextplain

.gitignore

Lines changed: 5 additions & 0 deletions
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

Lines changed: 50 additions & 0 deletions
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

Lines changed: 8 additions & 0 deletions
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

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tag
2-
===
1+
#Tag
2+
[![Software License](https://img.shields.io/badge/license-GPL-brightgreen.svg?style=flat)](LICENSE)
33

44
The Tag module is designed for site-wide tag management, handling tag input, display and stats for each module that enables tag plugin.

tag/class/blockform.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ function render()
5555
}
5656
$ret .= "</div>\n";
5757
$ret .= $this->renderValidationJS(true);
58+
5859
return $ret;
5960
}
6061
}

tag/class/formvalidatedinput.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ class TagFormValidatedInput extends XoopsFormText
4949
/**
5050
* Constructor
5151
*
52-
* @param string $caption Caption
53-
* @param string $name "name" attribute
54-
* @param int $size Size
55-
* @param int $maxlength Maximum length of text
56-
* @param string $value Initial text
52+
* @param string $caption Caption
53+
* @param string $name "name" attribute
54+
* @param int $size Size
55+
* @param int $maxlength Maximum length of text
56+
* @param string $value Initial text
5757
*/
5858
function __construct($caption, $name, $size, $maxlength, $value = '', $type='text')
5959
{
@@ -138,6 +138,7 @@ public function render()
138138
{
139139
$myClasses = $this->getClass();
140140
$classes = ($myClasses) ? " class='{$myClasses}'" : "";
141+
141142
return "<input type='" . $this->_type . "' name='" . $this->getName() . "' title='" . $this->getTitle() . "' id='" . $this->getName() . "' size='" . $this->getSize() . "' maxlength='" . $this->getMaxlength() . "' value='" . $this->getValue() . "'" . $classes . $this->getExtra() . " />";
142143
}
143144
}

tag/class/tag.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ public function TagTagHandler(&$db)
8989
* Get tags linked to an item
9090
*
9191
* @access public
92-
* @param int $itemid item ID
93-
* @param int $modid module ID, optional
94-
* @param int $catid id of corresponding category, optional
95-
* @return array associative array of tags (id, term)
92+
* @param int $itemid item ID
93+
* @param int $modid module ID, optional
94+
* @param int $catid id of corresponding category, optional
95+
* @return array associative array of tags (id, term)
9696
*/
9797
public function getByItem($itemid, $modid = 0, $catid = 0)
9898
{
@@ -123,10 +123,10 @@ public function getByItem($itemid, $modid = 0, $catid = 0)
123123
* Update tags linked to an item
124124
*
125125
* @access public
126-
* @param array|string array of $tags or a single tag
127-
* @param int $itemid item ID
128-
* @param int $modid module ID or module dirname, optional
129-
* @param int $catid id of corresponding category, optional
126+
* @param array|string array of $tags or a single tag
127+
* @param int $itemid item ID
128+
* @param int $modid module ID or module dirname, optional
129+
* @param int $catid id of corresponding category, optional
130130
* @return bool
131131
*/
132132
public function updateByItem($tags, $itemid, $modid = "", $catid = 0)
@@ -319,10 +319,10 @@ public function update_stats($tag_id, $modid = 0, $catid = 0)
319319
* Get tags with item count
320320
*
321321
* @access public
322-
* @param object $criteria {@link Criteria}
323-
* @param boolean $fromStats fetch from tag-stats table
322+
* @param object $criteria {@link Criteria}
323+
* @param boolean $fromStats fetch from tag-stats table
324324
*
325-
* @return array associative array of tags (id, term, count)
325+
* @return array associative array of tags (id, term, count)
326326
*/
327327
public function &getByLimit($criteria = null, $fromStats = true)
328328
{
@@ -390,7 +390,7 @@ public function &getByLimit($criteria = null, $fromStats = true)
390390
* Get count of tags
391391
*
392392
* @access public
393-
* @param object $criteria {@link Criteria)
393+
* @param object $criteria {@link Criteria)
394394
*
395395
* @return integer count
396396
*/

tag/header.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
* @version $Id: header.php 12898 2014-12-08 22:05:21Z zyspec $
2121
*/
2222

23-
2423
include_once '../../mainfile.php';
2524
include __DIR__ . "/include/vars.php";
2625
include_once __DIR__ . "/include/functions.php";

tag/include/action.module.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ function xoops_module_pre_install_tag(&$module)
5252
}
5353
if (!$success) {
5454
$module->setErrors("This module requires XOOPS {$requiredVer}+ ({$currentVer} installed)");
55+
5556
return false;
5657
}
5758

@@ -62,6 +63,7 @@ function xoops_module_pre_install_tag(&$module)
6263
$reqVer = $module->getInfo('min_php');
6364
if ($verNum < $reqVer) {
6465
$module->setErrors( "The module requires PHP {$reqVer}+ ({$verNum} installed)");
66+
6567
return false;
6668
}
6769

0 commit comments

Comments
 (0)