File mimetypes.php
has 620 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
// $Id: comment.php 506 2006-05-26 23:10:37Z skalpa $
// ------------------------------------------------------------------------ //
// XOOPS - PHP Content Management System //
// Copyright (c) 2000 XOOPS.org //
The class XoopsMimetypes_perms has 13 public methods. Consider refactoring XoopsMimetypes_perms to keep number of public methods under 10. Open
class XoopsMimetypes_perms extends XoopsObject {
var $db;
// constructor
function xoopsmimetypes_perms ($mperm_id=null) {
- Read upRead up
- Exclude checks
TooManyPublicMethods
Since: 0.1
A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.
By default it ignores methods starting with 'get' or 'set'.
Example
Source https://phpmd.org/rules/codesize.html#toomanypublicmethods
The class XoopsMimetypesHandler has an overall complexity of 56 which is very high. The configured complexity threshold is 50. Open
class XoopsMimetypesHandler extends XoopsObjectHandler {
function &create($isNew = true) {
$tplfile = new XoopsTplfile();
if ($isNew) {
- Exclude checks
The class XoopsMimetypes_permsHandler has an overall complexity of 57 which is very high. The configured complexity threshold is 50. Open
class XoopsMimetypes_permsHandler extends XoopsObjectHandler {
var $_errors = array();
function get_mimetypes($limit=20, $start=0, $module=-1, $OtherCriteria=null, $asobject=true) {
$ret = array();
- Exclude checks
Method insert
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
if (!$mimetype_object->isDirty()) {
Method insert
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes') {
return false;
}
if (!$mimetype_object->isDirty()) {
Function get_mimetypes
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function get_mimetypes($limit=20, $start=0, $module=-1, $OtherCriteria=null, $asobject=true) {
$ret = array();
$criteria = new CriteriaCompo();
if ( is_object($OtherCriteria) ) {
$criteria->add($OtherCriteria, 'AND');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get_mimetypes
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function get_mimetypes($limit=20, $start=0, $status=-1, $OtherCriteria=null, $sort='mime_ext', $order='ASC', $asobject=true) {
$ret = array();
$criteria = new CriteriaCompo();
if ( is_object($OtherCriteria) ) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method get_mimetypes
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function get_mimetypes($limit=20, $start=0, $module=-1, $OtherCriteria=null, $asobject=true) {
$ret = array();
$criteria = new CriteriaCompo();
if ( is_object($OtherCriteria) ) {
$criteria->add($OtherCriteria, 'AND');
Method get_mimetypes
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function get_mimetypes($limit=20, $start=0, $status=-1, $OtherCriteria=null, $sort='mime_ext', $order='ASC', $asobject=true) {
$ret = array();
$criteria = new CriteriaCompo();
if ( is_object($OtherCriteria) ) {
Function Get_TypeList
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function Get_TypeList() {
$ret = array();
$sql = 'SELECT * FROM ' . $this->db->prefix("mimetypes") ;
$result = $this->db->query($sql);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function insert
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function insert
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method get_mimetypes
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function get_mimetypes($limit=20, $start=0, $status=-1, $OtherCriteria=null, $sort='mime_ext', $order='ASC', $asobject=true) {
Method get_mimetypes
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function get_mimetypes($limit=20, $start=0, $module=-1, $OtherCriteria=null, $asobject=true) {
Method XoopsFormSelectMime
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function XoopsFormSelectMime( $caption, $name, $value=null, $size=1, $multiple=false ) {
Method XoopsFormSelectType
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function XoopsFormSelectType( $caption, $name, $value=null, $size=1, $multiple=false ) {
Function delete
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function delete(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes') {
return false;
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function allowedMimeTypes
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function allowedMimeTypes( $mid, $groups, $allowedMimeTypes ) {
$ret = array();
$sql = 'SELECT p.mperm_groups, t.mime_ext, t.mime_types FROM ' . $this->db->prefix('mimetypes_perms') . ' p LEFT JOIN ' .
$this->db->prefix("mimetypes") . ' t on p.mperm_mime = t.mime_id WHERE mperm_module=' . $mid;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Avoid too many return
statements within this method. Open
return true;
Avoid too many return
statements within this method. Open
return true;
Function GetSelectList
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function &GetSelectList($criteria = null) {
$ret = array();
$limit = $start = 0;
$sql = 'SELECT * FROM '.$this->db->prefix('mimetypes');
if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
The method insert() has an NPath complexity of 256. The configured NPath complexity threshold is 200. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method insert() has an NPath complexity of 256. The configured NPath complexity threshold is 200. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method get_mimetypes() has an NPath complexity of 288. The configured NPath complexity threshold is 200. Open
function get_mimetypes($limit=20, $start=0, $status=-1, $OtherCriteria=null, $sort='mime_ext', $order='ASC', $asobject=true) {
$ret = array();
$criteria = new CriteriaCompo();
if ( is_object($OtherCriteria) ) {
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method get_mimetypes() has an NPath complexity of 288. The configured NPath complexity threshold is 200. Open
function get_mimetypes($limit=20, $start=0, $module=-1, $OtherCriteria=null, $asobject=true) {
$ret = array();
$criteria = new CriteriaCompo();
if ( is_object($OtherCriteria) ) {
$criteria->add($OtherCriteria, 'AND');
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method get_mimetypes() has a Cyclomatic Complexity of 13. The configured cyclomatic complexity threshold is 10. Open
function get_mimetypes($limit=20, $start=0, $module=-1, $OtherCriteria=null, $asobject=true) {
$ret = array();
$criteria = new CriteriaCompo();
if ( is_object($OtherCriteria) ) {
$criteria->add($OtherCriteria, 'AND');
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
The method get_mimetypes() has a Cyclomatic Complexity of 13. The configured cyclomatic complexity threshold is 10. Open
function get_mimetypes($limit=20, $start=0, $status=-1, $OtherCriteria=null, $sort='mime_ext', $order='ASC', $asobject=true) {
$ret = array();
$criteria = new CriteriaCompo();
if ( is_object($OtherCriteria) ) {
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
Avoid using undefined variables such as '$mime_types' which will lead to PHP notices. Open
$this->db->quoteString($mime_types),
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$mime_types' which will lead to PHP notices. Open
$this->db->quoteString($mime_types),
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$mime_status' which will lead to PHP notices. Open
$mime_status);
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$mime_name' which will lead to PHP notices. Open
$this->db->quoteString($mime_name),
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$mime_status' which will lead to PHP notices. Open
$mime_status,
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$mperm_mime' which will lead to PHP notices. Open
$mperm_mime,
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$mperm_module' which will lead to PHP notices. Open
$mperm_module,
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$mperm_maxheight' which will lead to PHP notices. Open
$mperm_maxheight,
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$mperm_maxsize' which will lead to PHP notices. Open
$mperm_maxsize );
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$mime_id' which will lead to PHP notices. Open
$mime_id);
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$mperm_status' which will lead to PHP notices. Open
$mperm_status,
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$mperm_module' which will lead to PHP notices. Open
$mperm_module,
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$mperm_status' which will lead to PHP notices. Open
$mperm_status,
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$mperm_id' which will lead to PHP notices. Open
$mperm_id,
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$mperm_groups' which will lead to PHP notices. Open
$mperm_groups,
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$mperm_maxwidth' which will lead to PHP notices. Open
$mperm_maxwidth,
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$mime_ext' which will lead to PHP notices. Open
$this->db->quoteString($mime_ext),
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$mperm_maxwidth' which will lead to PHP notices. Open
$mperm_maxwidth,
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$mperm_maxsize' which will lead to PHP notices. Open
$mperm_maxsize,
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$mperm_mime' which will lead to PHP notices. Open
$mperm_mime,
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$mperm_groups' which will lead to PHP notices. Open
$this->db->quoteString($mperm_groups),
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$mperm_id' which will lead to PHP notices. Open
$mperm_id);
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$mime_name' which will lead to PHP notices. Open
$this->db->quoteString($mime_name),
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$mime_id' which will lead to PHP notices. Open
$mime_id,
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$mime_ext' which will lead to PHP notices. Open
$this->db->quoteString($mime_ext),
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$mperm_maxheight' which will lead to PHP notices. Open
$mperm_maxheight,
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
The method delete has a boolean flag argument $force, which is a certain sign of a Single Responsibility Principle violation. Open
function delete(&$mimetype_object, $force = false) {
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method deletebyMime has a boolean flag argument $force, which is a certain sign of a Single Responsibility Principle violation. Open
function deletebyMime(&$mimetype_object, $force = false) {
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Missing class import via use statement (line '142', column '18'). Open
$ret[] = new xoopsmimetypes( $myrow );
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '546', column '18'). Open
$ret[] = new xoopsmimetypes_perms( $myrow );
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
The method deletebyModule has a boolean flag argument $force, which is a certain sign of a Single Responsibility Principle violation. Open
function deletebyModule(&$mimetype_object, $force = false) {
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Missing class import via use statement (line '497', column '23'). Open
$criteria->add(new Criteria('p.mperm_module', $module), 'AND');
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Remove error control operator '@' on line 733. Open
function allowedMimeTypes( $mid, $groups, $allowedMimeTypes ) {
$ret = array();
$sql = 'SELECT p.mperm_groups, t.mime_ext, t.mime_types FROM ' . $this->db->prefix('mimetypes_perms') . ' p LEFT JOIN ' .
$this->db->prefix("mimetypes") . ' t on p.mperm_mime = t.mime_id WHERE mperm_module=' . $mid;
- Read upRead up
- Exclude checks
ErrorControlOperator
Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.
Example
function foo($filePath) {
$file = @fopen($filPath); // hides exceptions
$key = @$array[$notExistingKey]; // assigns null to $key
}
Source http://phpmd.org/rules/cleancode.html#errorcontroloperator
The method get_mimetypes has a boolean flag argument $asobject, which is a certain sign of a Single Responsibility Principle violation. Open
function get_mimetypes($limit=20, $start=0, $module=-1, $OtherCriteria=null, $asobject=true) {
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Missing class import via use statement (line '528', column '18'). Open
$ret[] = new xoopsmimetypes_perms( $myrow );
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
The method insert has a boolean flag argument $force, which is a certain sign of a Single Responsibility Principle violation. Open
function insert(&$mimetype_object, $force = false) {
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Missing class import via use statement (line '150', column '19'). Open
$criteria = new CriteriaCompo();
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '189', column '18'). Open
$ret[] = new xoopsmimetypes( $myrow );
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '487', column '19'). Open
$criteria = new CriteriaCompo();
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '161', column '23'). Open
$criteria->add(new Criteria('mime_status', $status), 'AND');
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '225', column '27'). Open
$mimetype_object = new xoopsmimetypes();
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '319', column '14'). Open
$ret = new XoopsFormSelect($caption, $name, $value, $size, $multiple);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
The method XoopsFormSelectType has a boolean flag argument $multiple, which is a certain sign of a Single Responsibility Principle violation. Open
function XoopsFormSelectType( $caption, $name, $value=null, $size=1, $multiple=false ) {
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method get_byMimeModule has a boolean flag argument $asobject, which is a certain sign of a Single Responsibility Principle violation. Open
function get_byMimeModule( $mime_id, $mid, $asobject=true) {
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method delete has a boolean flag argument $force, which is a certain sign of a Single Responsibility Principle violation. Open
function delete(&$mimetype_object, $force = false) {
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Missing class import via use statement (line '158', column '24'). Open
$criteria->add(new Criteria('mime_status', $v), 'AND');
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
The method create has a boolean flag argument $isNew, which is a certain sign of a Single Responsibility Principle violation. Open
function &create($isNew = true) {
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method insert has a boolean flag argument $force, which is a certain sign of a Single Responsibility Principle violation. Open
function insert(&$mimetype_object, $force = false) {
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Missing class import via use statement (line '494', column '24'). Open
$criteria->add(new Criteria('p.mperm_module', $v), 'AND');
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
The method deletebyMimeModule has a boolean flag argument $force, which is a certain sign of a Single Responsibility Principle violation. Open
function deletebyMimeModule(&$mimetype_object, $force = false) {
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Missing class import via use statement (line '122', column '18'). Open
$tplfile = new XoopsTplfile();
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '595', column '27'). Open
$mimetype_object = new xoopsmimetypes();
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
The method get_byExt has a boolean flag argument $asobject, which is a certain sign of a Single Responsibility Principle violation. Open
function get_byExt( $mime_ext, $asobject=true ) {
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method get_mimetypes has a boolean flag argument $asobject, which is a certain sign of a Single Responsibility Principle violation. Open
function get_mimetypes($limit=20, $start=0, $status=-1, $OtherCriteria=null, $sort='mime_ext', $order='ASC', $asobject=true) {
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method XoopsFormSelectMime has a boolean flag argument $multiple, which is a certain sign of a Single Responsibility Principle violation. Open
function XoopsFormSelectMime( $caption, $name, $value=null, $size=1, $multiple=false ) {
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Missing class import via use statement (line '327', column '14'). Open
$ret = new XoopsFormSelect($caption, $name, $value, $size, $multiple);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '320', column '19'). Open
$criteria = new CriteriaCompo();
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Avoid using static access to class 'MyTextSanitizer' in method 'mime_ext'. Open
$myts = &MyTextSanitizer::getInstance();
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method insert uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$result = $this->db->query($sql);
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class 'MyTextSanitizer' in method 'mime_name'. Open
$myts = &MyTextSanitizer::getInstance();
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method delete uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$result = $this->db->query($sql);
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class 'MyTextSanitizer' in method 'mime_module'. Open
$myts = &MyTextSanitizer::getInstance();
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method insert uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$format = "UPDATE %s SET ";
$format .="mperm_mime=%u, mperm_module=%u, mperm_groups=%s, mperm_status=%u, mperm_maxwidth=%u, mperm_maxheight=%u, mperm_maxsize=%u";
$format .=" WHERE mperm_id = %u";
$sql = sprintf($format, $this->db->prefix('mimetypes_perms'),
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method delete uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$result = $this->db->query($sql);
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid assigning values to variables in if clauses and the like (line '340', column '10'). Open
function Get_TypeList() {
$ret = array();
$sql = 'SELECT * FROM ' . $this->db->prefix("mimetypes") ;
$result = $this->db->query($sql);
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
The method xoopsmimetypes uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->load($mime_id);
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method xoopsmimetypes uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->setNew();
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class 'MyTextSanitizer' in method 'mime_types'. Open
$myts = &MyTextSanitizer::getInstance();
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'MyTextSanitizer' in method 'mime_name'. Open
$myts = &MyTextSanitizer::getInstance();
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'MyTextSanitizer' in method 'mime_ext'. Open
$myts = &MyTextSanitizer::getInstance();
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method get_byExt uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$ret[] = new xoopsmimetypes( $myrow );
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method insert uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$format = "UPDATE %s SET ";
$format .="mime_ext=%s, mime_types=%s, mime_name=%s, mime_status=%u";
$format .=" WHERE mime_id = %u";
$sql = sprintf($format, $this->db->prefix('mimetypes'),
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method deletebyMimeModule uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$result = $this->db->query($sql);
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class 'Database' in method 'xoopsmimetypes_perms'. Open
$this->db = Database::getInstance();
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'Database' in method 'xoopsmimetypes'. Open
$this->db = Database::getInstance();
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method xoopsmimetypes_perms uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->load($mperm_id);
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method insert uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$result = $this->db->query($sql);
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method get_mimetypes uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$ret[] = new xoopsmimetypes( $myrow );
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method get_byMimeModule uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$ret[] = new xoopsmimetypes_perms( $myrow );
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method deletebyMime uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$result = $this->db->query($sql);
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method deletebyModule uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$result = $this->db->query($sql);
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method xoopsmimetypes_perms uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->setNew();
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method delete uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$result = $this->db->query($sql);
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method getHtmlErrors uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$ret .= 'None<br />';
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method getHtmlErrors uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$ret .= 'None<br />';
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method get_mimetypes uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$ret[] = new xoopsmimetypes_perms( $myrow );
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Classes should not have a constructor method with the same name as the class Open
function xoopsmimetypes_perms ($mperm_id=null) {
$this->db = Database::getInstance();
$this->initVar('mperm_id',XOBJ_DTYPE_INT,0,true,10);
$this->initVar('mperm_mime',XOBJ_DTYPE_INT,0,true,11);
$this->initVar('mperm_module' ,XOBJ_DTYPE_INT,0,true,5);
- Read upRead up
- Exclude checks
ConstructorWithNameAsEnclosingClass
Since: 0.2
A constructor method should not have the same name as the enclosing class, consider to use the PHP 5 __construct method.
Example
class MyClass {
// this is bad because it is PHP 4 style
public function MyClass() {}
// this is good because it is a PHP 5 constructor
public function __construct() {}
}
Source https://phpmd.org/rules/naming.html#constructorwithnameasenclosingclass
Classes should not have a constructor method with the same name as the class Open
function xoopsmimetypes ($mime_id=null) {
$this->db = Database::getInstance();
$this->initVar('mime_id',XOBJ_DTYPE_INT,0,true,11);
$this->initVar('mime_ext',XOBJ_DTYPE_TXTBOX,'',true,10);
$this->initVar('mime_types',XOBJ_DTYPE_TXTAREA,'',true,0);
- Read upRead up
- Exclude checks
ConstructorWithNameAsEnclosingClass
Since: 0.2
A constructor method should not have the same name as the enclosing class, consider to use the PHP 5 __construct method.
Example
class MyClass {
// this is bad because it is PHP 4 style
public function MyClass() {}
// this is good because it is a PHP 5 constructor
public function __construct() {}
}
Source https://phpmd.org/rules/naming.html#constructorwithnameasenclosingclass
Avoid unused parameters such as '$notNullFields'. Open
function getCount($criteria = null, $notNullFields='') {
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$notNullFields'. Open
function getCount($criteria = null, $notNullFields='') {
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Similar blocks of code found in 2 locations. Consider refactoring. Open
function deletebyMimeModule(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
$sql = sprintf("DELETE FROM %s WHERE mperm_mime = %u AND mperm_module = %u", $this->db->prefix("mimetypes_perms"), $mimetype_object->getVar('mperm_mime'), $mimetype_object->getVar('mperm_module'));
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 167.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
function deletebyModule(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 167.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
function deletebyMime(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
$sql = sprintf("DELETE FROM %s WHERE mperm_mime = %u", $this->db->prefix("mimetypes_perms"), $mimetype_object->getVar('mperm_mime'));
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 158.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
function delete(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
$sql = sprintf("DELETE FROM %s WHERE mperm_id = %u", $this->db->prefix("mimetypes_perms"), $mimetype_object->getVar('mperm_id'));
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 158.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
$sql .= ' '.$criteria->renderWhere();
if ($criteria->getSort() != '') {
$sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 92.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
$sql .= ' '.$criteria->renderWhere();
if ($criteria->getSort() != '') {
$sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 92.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class XoopsMimetypes extends XoopsObject {
- Exclude checks
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class XoopsMimetypesHandler extends XoopsObjectHandler {
- Exclude checks
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class XoopsMimetypes_permsHandler extends XoopsObjectHandler {
- Exclude checks
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class XoopsMimetypes_perms extends XoopsObject {
- Exclude checks
The parameter $mime_id is not named in camelCase. Open
function get_byMimeModule( $mime_id, $mid, $asobject=true) {
$ret = array();
$sql = 'SELECT * FROM ' . $this->db->prefix('mimetypes_perms') . ' WHERE mperm_mime = ' . $mime_id . ' AND mperm_module = ' . $mid;
$result = $this->db->query($sql);
if (!$result) {
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $mimetype_object is not named in camelCase. Open
function delete(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes') {
return false;
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $OtherCriteria is not named in camelCase. Open
function get_mimetypes($limit=20, $start=0, $module=-1, $OtherCriteria=null, $asobject=true) {
$ret = array();
$criteria = new CriteriaCompo();
if ( is_object($OtherCriteria) ) {
$criteria->add($OtherCriteria, 'AND');
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $module_id is not named in camelCase. Open
function load($module_id) {
$sql = 'SELECT p.*, t.mime_ext, t.mime_name, m.name FROM ' . $this->db->prefix('mimetypes_perms') . ' p LEFT JOIN ' .
$this->db->prefix("mimetypes") . ' t on p.mperm_mime = t.mime_id LEFT JOIN ' .
$this->db->prefix("modules") . ' m on p.mperm_module = m.mid' . ' WHERE mperm_id=' . $this->db->quoteString($module_id);
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $mimetype_object is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $mimetype_object is not named in camelCase. Open
function deletebyModule(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The property $_errors is not named in camelCase. Open
class XoopsMimetypes_permsHandler extends XoopsObjectHandler {
var $_errors = array();
function get_mimetypes($limit=20, $start=0, $module=-1, $OtherCriteria=null, $asobject=true) {
$ret = array();
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The parameter $mime_id is not named in camelCase. Open
function xoopsmimetypes ($mime_id=null) {
$this->db = Database::getInstance();
$this->initVar('mime_id',XOBJ_DTYPE_INT,0,true,11);
$this->initVar('mime_ext',XOBJ_DTYPE_TXTBOX,'',true,10);
$this->initVar('mime_types',XOBJ_DTYPE_TXTAREA,'',true,0);
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $mimetype_object is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
Avoid variables with short names like $db. Configured minimum length is 3. Open
var $db;
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $db. Configured minimum length is 3. Open
var $db;
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
The parameter $mime_ext is not named in camelCase. Open
function get_byExt( $mime_ext, $asobject=true ) {
$ret = array();
$sql = 'SELECT * FROM ' . $this->db->prefix('mimetypes') . ' WHERE mime_ext = ' . $this->db->quoteString($mime_ext);
$result = $this->db->query($sql);
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $OtherCriteria is not named in camelCase. Open
function get_mimetypes($limit=20, $start=0, $status=-1, $OtherCriteria=null, $sort='mime_ext', $order='ASC', $asobject=true) {
$ret = array();
$criteria = new CriteriaCompo();
if ( is_object($OtherCriteria) ) {
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The class XoopsMimetypes_perms is not named in CamelCase. Open
class XoopsMimetypes_perms extends XoopsObject {
var $db;
// constructor
function xoopsmimetypes_perms ($mperm_id=null) {
- Read upRead up
- Exclude checks
CamelCaseClassName
Since: 0.2
It is considered best practice to use the CamelCase notation to name classes.
Example
class class_name {
}
Source
The parameter $err_str is not named in camelCase. Open
function setErrors($err_str) {
$this->_errors[] = trim($err_str);
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $mimetype_object is not named in camelCase. Open
function deletebyMimeModule(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
$sql = sprintf("DELETE FROM %s WHERE mperm_mime = %u AND mperm_module = %u", $this->db->prefix("mimetypes_perms"), $mimetype_object->getVar('mperm_mime'), $mimetype_object->getVar('mperm_module'));
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $mimetype_object is not named in camelCase. Open
function deletebyMime(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
$sql = sprintf("DELETE FROM %s WHERE mperm_mime = %u", $this->db->prefix("mimetypes_perms"), $mimetype_object->getVar('mperm_mime'));
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $mime_ext is not named in camelCase. Open
function load_byExt($mime_ext) {
$sql = 'SELECT * FROM '.$this->db->prefix('mimetypes').' WHERE mime_ext=' . $this->db->quoteString($mime_ext);
$myrow = $this->db->fetchArray($this->db->query($sql));
$this->assignVars($myrow);
if (!$myrow) {
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $mime_id is not named in camelCase. Open
function load($mime_id) {
$sql = 'SELECT * FROM '.$this->db->prefix('mimetypes').' WHERE mime_id='.$mime_id;
$myrow = $this->db->fetchArray($this->db->query($sql));
$this->assignVars($myrow);
if (!$myrow) {
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $mperm_id is not named in camelCase. Open
function xoopsmimetypes_perms ($mperm_id=null) {
$this->db = Database::getInstance();
$this->initVar('mperm_id',XOBJ_DTYPE_INT,0,true,10);
$this->initVar('mperm_mime',XOBJ_DTYPE_INT,0,true,11);
$this->initVar('mperm_module' ,XOBJ_DTYPE_INT,0,true,5);
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The class XoopsMimetypes_permsHandler is not named in CamelCase. Open
class XoopsMimetypes_permsHandler extends XoopsObjectHandler {
var $_errors = array();
function get_mimetypes($limit=20, $start=0, $module=-1, $OtherCriteria=null, $asobject=true) {
$ret = array();
- Read upRead up
- Exclude checks
CamelCaseClassName
Since: 0.2
It is considered best practice to use the CamelCase notation to name classes.
Example
class class_name {
}
Source
The parameter $mimetype_object is not named in camelCase. Open
function delete(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
$sql = sprintf("DELETE FROM %s WHERE mperm_id = %u", $this->db->prefix("mimetypes_perms"), $mimetype_object->getVar('mperm_id'));
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $err_str is not named in camelCase. Open
function setErrors($err_str) {
$this->_errors[] = trim($err_str);
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 42 and the first side effect is on line 37. Open
<?php
- Exclude checks
Each class must be in a file by itself Open
class XoopsMimetypesHandler extends XoopsObjectHandler {
- Exclude checks
Each class must be in a file by itself Open
class XoopsMimetypes_perms extends XoopsObject {
- Exclude checks
Each class must be in a file by itself Open
class XoopsMimetypes_permsHandler extends XoopsObjectHandler {
- Exclude checks
Visibility must be declared on method "xoopsmimetypes" Open
function xoopsmimetypes ($mime_id=null) {
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$mime_id"; expected 1 but found 0 Open
function xoopsmimetypes ($mime_id=null) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( !empty($mime_id) ) {
- Exclude checks
Visibility must be declared on method "load_byExt" Open
function load_byExt($mime_ext) {
- Exclude checks
Expected 0 spaces before opening parenthesis; 1 found Open
function xoopsmimetypes ($mime_id=null) {
- Exclude checks
Expected "function abc(...)"; found "function abc (...)" Open
function xoopsmimetypes ($mime_id=null) {
- Exclude checks
Incorrect spacing between argument "$mime_id" and equals sign; expected 1 but found 0 Open
function xoopsmimetypes ($mime_id=null) {
- Exclude checks
Opening brace of a class must be on the line after the definition Open
class XoopsMimetypes extends XoopsObject {
- Exclude checks
Visibility must be declared on property "$db" Open
var $db;
- Exclude checks
The var keyword must not be used to declare a property Open
var $db;
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( is_array($mime_id) ) {
- Exclude checks
Visibility must be declared on method "load" Open
function load($mime_id) {
- Exclude checks
Method name "XoopsMimetypes::load_byExt" is not in camel caps format Open
function load_byExt($mime_ext) {
- Exclude checks
Visibility must be declared on method "mime_types" Open
function mime_types($format='S') {
- Exclude checks
Visibility must be declared on method "mime_status" Open
function mime_status() {
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$format"; expected 1 but found 0 Open
function mime_types($format='S') {
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$asobject"; expected 1 but found 0 Open
function get_mimetypes($limit=20, $start=0, $status=-1, $OtherCriteria=null, $sort='mime_ext', $order='ASC', $asobject=true) {
- Exclude checks
Visibility must be declared on method "mime_name" Open
function mime_name($format='S') {
- Exclude checks
Incorrect spacing between argument "$status" and equals sign; expected 1 but found 0 Open
function get_mimetypes($limit=20, $start=0, $status=-1, $OtherCriteria=null, $sort='mime_ext', $order='ASC', $asobject=true) {
- Exclude checks
Expected 0 spaces between argument "$multiple" and closing bracket; 1 found Open
function XoopsFormSelectMime( $caption, $name, $value=null, $size=1, $multiple=false ) {
- Exclude checks
Incorrect spacing between argument "$asobject" and equals sign; expected 1 but found 0 Open
function get_mimetypes($limit=20, $start=0, $status=-1, $OtherCriteria=null, $sort='mime_ext', $order='ASC', $asobject=true) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
} elseif ( isset($status) && ($status != -1) ) {
- Exclude checks
Incorrect spacing between argument "$notNullFields" and equals sign; expected 1 but found 0 Open
function getCount($criteria = null, $notNullFields='') {
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$asobject"; expected 1 but found 0 Open
function get_byExt( $mime_ext, $asobject=true ) {
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$order"; expected 1 but found 0 Open
function get_mimetypes($limit=20, $start=0, $status=-1, $OtherCriteria=null, $sort='mime_ext', $order='ASC', $asobject=true) {
- Exclude checks
Method name "XoopsMimetypes::mime_ext" is not in camel caps format Open
function mime_ext($format='S') {
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$format"; expected 1 but found 0 Open
function mime_name($format='S') {
- Exclude checks
Visibility must be declared on method "insert" Open
function insert(&$mimetype_object, $force = false) {
- Exclude checks
Incorrect spacing between argument "$start" and equals sign; expected 1 but found 0 Open
function get_mimetypes($limit=20, $start=0, $status=-1, $OtherCriteria=null, $sort='mime_ext', $order='ASC', $asobject=true) {
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$sort"; expected 1 but found 0 Open
function get_mimetypes($limit=20, $start=0, $status=-1, $OtherCriteria=null, $sort='mime_ext', $order='ASC', $asobject=true) {
- Exclude checks
Method name "XoopsMimetypes::mime_id" is not in camel caps format Open
function mime_id() {
- Exclude checks
Incorrect spacing between argument "$format" and equals sign; expected 1 but found 0 Open
function mime_ext($format='S') {
- Exclude checks
Method name "XoopsMimetypesHandler::XoopsFormSelectMime" is not in camel caps format Open
function XoopsFormSelectMime( $caption, $name, $value=null, $size=1, $multiple=false ) {
- Exclude checks
Method name "XoopsMimetypes::mime_name" is not in camel caps format Open
function mime_name($format='S') {
- Exclude checks
Opening brace of a class must be on the line after the definition Open
class XoopsMimetypesHandler extends XoopsObjectHandler {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( is_object($OtherCriteria) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( isset($status) && (is_array($status)) ) {
- Exclude checks
Empty lines are not allowed in multi-line function calls Open
- Exclude checks
Visibility must be declared on method "GetSelectList" Open
function &GetSelectList($criteria = null) {
- Exclude checks
Method name "XoopsMimetypes::mime_types" is not in camel caps format Open
function mime_types($format='S') {
- Exclude checks
Visibility must be declared on method "create" Open
function &create($isNew = true) {
- Exclude checks
Expected 0 spaces between argument "$asobject" and closing bracket; 1 found Open
function get_byExt( $mime_ext, $asobject=true ) {
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$notNullFields"; expected 1 but found 0 Open
function getCount($criteria = null, $notNullFields='') {
- Exclude checks
Visibility must be declared on method "get_mimetypes" Open
function get_mimetypes($limit=20, $start=0, $status=-1, $OtherCriteria=null, $sort='mime_ext', $order='ASC', $asobject=true) {
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$start"; expected 1 but found 0 Open
function get_mimetypes($limit=20, $start=0, $status=-1, $OtherCriteria=null, $sort='mime_ext', $order='ASC', $asobject=true) {
- Exclude checks
Visibility must be declared on method "delete" Open
function delete(&$mimetype_object, $force = false) {
- Exclude checks
Visibility must be declared on method "mime_id" Open
function mime_id() {
- Exclude checks
Visibility must be declared on method "getCount" Open
function getCount($criteria = null, $notNullFields='') {
- Exclude checks
Space found before comma in function call Open
$sql = sprintf($format ,
- Exclude checks
Incorrect spacing between argument "$limit" and equals sign; expected 1 but found 0 Open
function get_mimetypes($limit=20, $start=0, $status=-1, $OtherCriteria=null, $sort='mime_ext', $order='ASC', $asobject=true) {
- Exclude checks
Incorrect spacing between argument "$OtherCriteria" and equals sign; expected 1 but found 0 Open
function get_mimetypes($limit=20, $start=0, $status=-1, $OtherCriteria=null, $sort='mime_ext', $order='ASC', $asobject=true) {
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$OtherCriteria"; expected 1 but found 0 Open
function get_mimetypes($limit=20, $start=0, $status=-1, $OtherCriteria=null, $sort='mime_ext', $order='ASC', $asobject=true) {
- Exclude checks
Incorrect spacing between argument "$order" and equals sign; expected 1 but found 0 Open
function get_mimetypes($limit=20, $start=0, $status=-1, $OtherCriteria=null, $sort='mime_ext', $order='ASC', $asobject=true) {
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$size"; expected 1 but found 0 Open
function XoopsFormSelectType( $caption, $name, $value=null, $size=1, $multiple=false ) {
- Exclude checks
Visibility must be declared on method "mime_ext" Open
function mime_ext($format='S') {
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$format"; expected 1 but found 0 Open
function mime_ext($format='S') {
- Exclude checks
Incorrect spacing between argument "$format" and equals sign; expected 1 but found 0 Open
function mime_types($format='S') {
- Exclude checks
Incorrect spacing between argument "$asobject" and equals sign; expected 1 but found 0 Open
function get_byExt( $mime_ext, $asobject=true ) {
- Exclude checks
Visibility must be declared on method "get_byExt" Open
function get_byExt( $mime_ext, $asobject=true ) {
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$status"; expected 1 but found 0 Open
function get_mimetypes($limit=20, $start=0, $status=-1, $OtherCriteria=null, $sort='mime_ext', $order='ASC', $asobject=true) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( !$asobject ) {
- Exclude checks
Method name "XoopsMimetypesHandler::get_mimetypes" is not in camel caps format Open
function get_mimetypes($limit=20, $start=0, $status=-1, $OtherCriteria=null, $sort='mime_ext', $order='ASC', $asobject=true) {
- Exclude checks
Incorrect spacing between argument "$sort" and equals sign; expected 1 but found 0 Open
function get_mimetypes($limit=20, $start=0, $status=-1, $OtherCriteria=null, $sort='mime_ext', $order='ASC', $asobject=true) {
- Exclude checks
Expected 0 spaces between argument "$multiple" and closing bracket; 1 found Open
function XoopsFormSelectType( $caption, $name, $value=null, $size=1, $multiple=false ) {
- Exclude checks
Method name "XoopsMimetypes::mime_status" is not in camel caps format Open
function mime_status() {
- Exclude checks
Method name "XoopsMimetypesHandler::get_byExt" is not in camel caps format Open
function get_byExt( $mime_ext, $asobject=true ) {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$mime_ext"; 1 found Open
function get_byExt( $mime_ext, $asobject=true ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( !$asobject ) {
- Exclude checks
Method name "XoopsMimetypesHandler::GetSelectList" is not in camel caps format Open
function &GetSelectList($criteria = null) {
- Exclude checks
Visibility must be declared on method "XoopsFormSelectMime" Open
function XoopsFormSelectMime( $caption, $name, $value=null, $size=1, $multiple=false ) {
- Exclude checks
Incorrect spacing between argument "$format" and equals sign; expected 1 but found 0 Open
function mime_name($format='S') {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
while ( $myrow = $this->db->fetchArray($result) ) {
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$limit"; expected 1 but found 0 Open
function get_mimetypes($limit=20, $start=0, $status=-1, $OtherCriteria=null, $sort='mime_ext', $order='ASC', $asobject=true) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
while ( $myrow = $this->db->fetchArray($result) ) {
- Exclude checks
Incorrect spacing between argument "$value" and equals sign; expected 1 but found 0 Open
function XoopsFormSelectMime( $caption, $name, $value=null, $size=1, $multiple=false ) {
- Exclude checks
Incorrect spacing between argument "$size" and equals sign; expected 1 but found 0 Open
function XoopsFormSelectMime( $caption, $name, $value=null, $size=1, $multiple=false ) {
- Exclude checks
Incorrect spacing between argument "$multiple" and equals sign; expected 1 but found 0 Open
function XoopsFormSelectMime( $caption, $name, $value=null, $size=1, $multiple=false ) {
- Exclude checks
Visibility must be declared on method "XoopsFormSelectType" Open
function XoopsFormSelectType( $caption, $name, $value=null, $size=1, $multiple=false ) {
- Exclude checks
Incorrect spacing between argument "$size" and equals sign; expected 1 but found 0 Open
function XoopsFormSelectType( $caption, $name, $value=null, $size=1, $multiple=false ) {
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$multiple"; expected 1 but found 0 Open
function XoopsFormSelectType( $caption, $name, $value=null, $size=1, $multiple=false ) {
- Exclude checks
Visibility must be declared on method "xoopsmimetypes_perms" Open
function xoopsmimetypes_perms ($mperm_id=null) {
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$value"; expected 1 but found 0 Open
function XoopsFormSelectType( $caption, $name, $value=null, $size=1, $multiple=false ) {
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$size"; expected 1 but found 0 Open
function XoopsFormSelectMime( $caption, $name, $value=null, $size=1, $multiple=false ) {
- Exclude checks
Visibility must be declared on method "Get_TypeList" Open
function Get_TypeList() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( !empty($mperm_id) ) {
- Exclude checks
Method name "XoopsMimetypes_perms::mperm_module" is not in camel caps format Open
function mperm_module() {
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$format"; expected 1 but found 0 Open
function mime_ext($format='S') {
- Exclude checks
Method name "XoopsMimetypes_perms::mperm_status" is not in camel caps format Open
function mperm_status() {
- Exclude checks
Visibility must be declared on method "getHtmlErrors" Open
function getHtmlErrors() {
- Exclude checks
Expected "function abc(...)"; found "function abc (...)" Open
function xoopsmimetypes_perms ($mperm_id=null) {
- Exclude checks
Method name "XoopsMimetypes_perms::mime_id" is not in camel caps format Open
function mime_id() {
- Exclude checks
Method name "XoopsMimetypes_perms::mime_ext" is not in camel caps format Open
function mime_ext($format='S') {
- Exclude checks
Method name "XoopsMimetypes_perms::mperm_maxwidth" is not in camel caps format Open
function mperm_maxwidth() {
- Exclude checks
Method name "XoopsMimetypesHandler::XoopsFormSelectType" is not in camel caps format Open
function XoopsFormSelectType( $caption, $name, $value=null, $size=1, $multiple=false ) {
- Exclude checks
Incorrect spacing between argument "$value" and equals sign; expected 1 but found 0 Open
function XoopsFormSelectType( $caption, $name, $value=null, $size=1, $multiple=false ) {
- Exclude checks
Method name "XoopsMimetypesHandler::Get_TypeList" is not in camel caps format Open
function Get_TypeList() {
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$value"; expected 1 but found 0 Open
function XoopsFormSelectMime( $caption, $name, $value=null, $size=1, $multiple=false ) {
- Exclude checks
Incorrect spacing between argument "$format" and equals sign; expected 1 but found 0 Open
function mime_module($format='S') {
- Exclude checks
Visibility must be declared on method "mperm_maxwidth" Open
function mperm_maxwidth() {
- Exclude checks
Method name "XoopsMimetypes_permsHandler::get_mimetypes" is not in camel caps format Open
function get_mimetypes($limit=20, $start=0, $module=-1, $OtherCriteria=null, $asobject=true) {
- Exclude checks
Visibility must be declared on method "get_mimetypes" Open
function get_mimetypes($limit=20, $start=0, $module=-1, $OtherCriteria=null, $asobject=true) {
- Exclude checks
Incorrect spacing between argument "$OtherCriteria" and equals sign; expected 1 but found 0 Open
function get_mimetypes($limit=20, $start=0, $module=-1, $OtherCriteria=null, $asobject=true) {
- Exclude checks
Visibility must be declared on method "mperm_mime" Open
function mperm_mime() {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$mime_id"; 1 found Open
function get_byMimeModule( $mime_id, $mid, $asobject=true) {
- Exclude checks
Visibility must be declared on property "$_errors" Open
var $_errors = array();
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$notNullFields"; expected 1 but found 0 Open
function getCount($criteria = null, $notNullFields='') {
- Exclude checks
Expected 0 spaces between argument "$mid" and closing bracket; 1 found Open
function mime_module( $mid ) {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$caption"; 1 found Open
function XoopsFormSelectMime( $caption, $name, $value=null, $size=1, $multiple=false ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( !in_array ($type, $ret) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( is_array($mperm_id) ) {
- Exclude checks
Visibility must be declared on method "load" Open
function load($module_id) {
- Exclude checks
Visibility must be declared on method "mime_module" Open
function mime_module($format='S') {
- Exclude checks
Method name "XoopsMimetypes_perms::mime_name" is not in camel caps format Open
function mime_name($format='S') {
- Exclude checks
Method name "XoopsMimetypes_perms::GetGroups" is not in camel caps format Open
function GetGroups() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
while ( $myrow = $this->db->fetchArray($result) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( $type = substr( $mime_type, 0, strpos($mime_type, '/') ) ) {
- Exclude checks
The var keyword must not be used to declare a property Open
var $db;
- Exclude checks
Space found before comma in function call Open
$this->initVar('mperm_module' ,XOBJ_DTYPE_INT,0,true,5);
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$mperm_id"; expected 1 but found 0 Open
function xoopsmimetypes_perms ($mperm_id=null) {
- Exclude checks
Method name "XoopsMimetypes_perms::mime_groups" is not in camel caps format Open
function mime_groups() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
while ( $myrow = $this->db->fetchArray($result) ) {
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$format"; expected 1 but found 0 Open
function mime_name($format='S') {
- Exclude checks
The var keyword must not be used to declare a property Open
var $_errors = array();
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( is_object($OtherCriteria) ) {
- Exclude checks
Method name "XoopsMimetypes_permsHandler::get_byMimeModule" is not in camel caps format Open
function get_byMimeModule( $mime_id, $mid, $asobject=true) {
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$asobject"; expected 1 but found 0 Open
function get_byMimeModule( $mime_id, $mid, $asobject=true) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
foreach ( $mime_types as $mime_type ) {
- Exclude checks
Visibility must be declared on method "setErrors" Open
function setErrors($err_str) {
- Exclude checks
Visibility must be declared on property "$db" Open
var $db;
- Exclude checks
Incorrect spacing between argument "$asobject" and equals sign; expected 1 but found 0 Open
function get_mimetypes($limit=20, $start=0, $module=-1, $OtherCriteria=null, $asobject=true) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
while ( $myrow = $this->db->fetchArray($result) ) {
- Exclude checks
Visibility must be declared on method "mime_module" Open
function mime_module( $mid ) {
- Exclude checks
Visibility must be declared on method "mime_ext" Open
function mime_ext($format='S') {
- Exclude checks
Visibility must be declared on method "mime_groups" Open
function mime_groups() {
- Exclude checks
Visibility must be declared on method "getCount" Open
function getCount($criteria = null, $notNullFields='') {
- Exclude checks
Space found after opening bracket of FOREACH loop Open
foreach ( $mime_types as $mime_type ) {
- Exclude checks
Method name "XoopsMimetypes_perms::mime_module" is not in camel caps format Open
function mime_module($format='S') {
- Exclude checks
Incorrect spacing between argument "$limit" and equals sign; expected 1 but found 0 Open
function get_mimetypes($limit=20, $start=0, $module=-1, $OtherCriteria=null, $asobject=true) {
- Exclude checks
Incorrect spacing between argument "$start" and equals sign; expected 1 but found 0 Open
function get_mimetypes($limit=20, $start=0, $module=-1, $OtherCriteria=null, $asobject=true) {
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$module"; expected 1 but found 0 Open
function get_mimetypes($limit=20, $start=0, $module=-1, $OtherCriteria=null, $asobject=true) {
- Exclude checks
Incorrect spacing between argument "$asobject" and equals sign; expected 1 but found 0 Open
function get_byMimeModule( $mime_id, $mid, $asobject=true) {
- Exclude checks
Method name "XoopsMimetypes_permsHandler::mime_module" is not in camel caps format Open
function mime_module( $mid ) {
- Exclude checks
Incorrect spacing between argument "$multiple" and equals sign; expected 1 but found 0 Open
function XoopsFormSelectType( $caption, $name, $value=null, $size=1, $multiple=false ) {
- Exclude checks
Method name "XoopsMimetypes_perms::xoopsmimetypes_perms" is not in camel caps format Open
function xoopsmimetypes_perms ($mperm_id=null) {
- Exclude checks
Space found before comma in function call Open
$this->initVar('mperm_groups' ,XOBJ_DTYPE_TXTAREA,'',false,0);
- Exclude checks
Visibility must be declared on method "mime_id" Open
function mime_id() {
- Exclude checks
Incorrect spacing between argument "$module" and equals sign; expected 1 but found 0 Open
function get_mimetypes($limit=20, $start=0, $module=-1, $OtherCriteria=null, $asobject=true) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
} elseif ( isset($module) && ($module != -1) ) {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$mid"; 1 found Open
function mime_module( $mid ) {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$caption"; 1 found Open
function XoopsFormSelectType( $caption, $name, $value=null, $size=1, $multiple=false ) {
- Exclude checks
Space found before closing bracket of FOREACH loop Open
foreach ( $mime_types as $mime_type ) {
- Exclude checks
Opening brace of a class must be on the line after the definition Open
class XoopsMimetypes_perms extends XoopsObject {
- Exclude checks
Expected 0 spaces before opening parenthesis; 1 found Open
function xoopsmimetypes_perms ($mperm_id=null) {
- Exclude checks
Space found before comma in function call Open
$this->initVar('mperm_status' ,XOBJ_DTYPE_INT,0,true,1);
- Exclude checks
Space found before comma in function call Open
$this->initVar('mperm_maxwidth' ,XOBJ_DTYPE_INT,0,true,4);
- Exclude checks
Incorrect spacing between argument "$format" and equals sign; expected 1 but found 0 Open
function mime_ext($format='S') {
- Exclude checks
Visibility must be declared on method "mperm_maxsize" Open
function mperm_maxsize() {
- Exclude checks
Visibility must be declared on method "mperm_status" Open
function mperm_status() {
- Exclude checks
Opening brace of a class must be on the line after the definition Open
class XoopsMimetypes_permsHandler extends XoopsObjectHandler {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( !$asobject ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( !$asobject ) {
- Exclude checks
Space found before comma in function call Open
$this->initVar('mperm_maxsize' ,XOBJ_DTYPE_INT,0,true,8);
- Exclude checks
Incorrect spacing between argument "$notNullFields" and equals sign; expected 1 but found 0 Open
function getCount($criteria = null, $notNullFields='') {
- Exclude checks
Method name "XoopsMimetypes_perms::mperm_mime" is not in camel caps format Open
function mperm_mime() {
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$format"; expected 1 but found 0 Open
function mime_module($format='S') {
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$multiple"; expected 1 but found 0 Open
function XoopsFormSelectMime( $caption, $name, $value=null, $size=1, $multiple=false ) {
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$OtherCriteria"; expected 1 but found 0 Open
function get_mimetypes($limit=20, $start=0, $module=-1, $OtherCriteria=null, $asobject=true) {
- Exclude checks
Incorrect spacing between argument "$mperm_id" and equals sign; expected 1 but found 0 Open
function xoopsmimetypes_perms ($mperm_id=null) {
- Exclude checks
Incorrect spacing between argument "$format" and equals sign; expected 1 but found 0 Open
function mime_name($format='S') {
- Exclude checks
Method name "XoopsMimetypes_perms::mperm_maxsize" is not in camel caps format Open
function mperm_maxsize() {
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$start"; expected 1 but found 0 Open
function get_mimetypes($limit=20, $start=0, $module=-1, $OtherCriteria=null, $asobject=true) {
- Exclude checks
Visibility must be declared on method "mime_name" Open
function mime_name($format='S') {
- Exclude checks
Method name "XoopsMimetypes_perms::mperm_maxheight" is not in camel caps format Open
function mperm_maxheight() {
- Exclude checks
Visibility must be declared on method "GetGroups" Open
function GetGroups() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( isset($module) && (is_array($module)) ) {
- Exclude checks
Visibility must be declared on method "get_byMimeModule" Open
function get_byMimeModule( $mime_id, $mid, $asobject=true) {
- Exclude checks
Visibility must be declared on method "mperm_module" Open
function mperm_module() {
- Exclude checks
Visibility must be declared on method "mperm_maxheight" Open
function mperm_maxheight() {
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$limit"; expected 1 but found 0 Open
function get_mimetypes($limit=20, $start=0, $module=-1, $OtherCriteria=null, $asobject=true) {
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$asobject"; expected 1 but found 0 Open
function get_mimetypes($limit=20, $start=0, $module=-1, $OtherCriteria=null, $asobject=true) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
while ( $myrow = $this->db->fetchArray($result) ) {
- Exclude checks
Space found before comma in function call Open
$sql = sprintf($format ,
- Exclude checks
Property name "$_errors" should not be prefixed with an underscore to indicate visibility Open
var $_errors = array();
- Exclude checks
Visibility must be declared on method "deletebyMimeModule" Open
function deletebyMimeModule(&$mimetype_object, $force = false) {
- Exclude checks
Expected 0 spaces between argument "$allowedMimeTypes" and closing bracket; 1 found Open
function allowedMimeTypes( $mid, $groups, $allowedMimeTypes ) {
- Exclude checks
Expected 0 spaces between opening bracket and argument "$mid"; 1 found Open
function allowedMimeTypes( $mid, $groups, $allowedMimeTypes ) {
- Exclude checks
Visibility must be declared on method "allowedMimeTypes" Open
function allowedMimeTypes( $mid, $groups, $allowedMimeTypes ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
while ( $myrow = $this->db->fetchArray($result) ) {
- Exclude checks
Visibility must be declared on method "setErrors" Open
function setErrors($err_str) {
- Exclude checks
Visibility must be declared on method "getHtmlErrors" Open
function getHtmlErrors() {
- Exclude checks
Visibility must be declared on method "insert" Open
function insert(&$mimetype_object, $force = false) {
- Exclude checks
Visibility must be declared on method "deletebyMime" Open
function deletebyMime(&$mimetype_object, $force = false) {
- Exclude checks
Visibility must be declared on method "delete" Open
function delete(&$mimetype_object, $force = false) {
- Exclude checks
Visibility must be declared on method "deletebyModule" Open
function deletebyModule(&$mimetype_object, $force = false) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( count($ret) == 0 ) {
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
$sql = sprintf($format, $this->db->prefix('mimetypes'),
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
$sql = sprintf($format, $this->db->prefix('mimetypes_perms'),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->initVar('mime_ext',XOBJ_DTYPE_TXTBOX,'',true,10);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$sql = 'SELECT * FROM '.$this->db->prefix('mimetypes').' WHERE mime_id='.$mime_id;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->setNew();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$myrow) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
var $db;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->setNew();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assignVars($mime_id);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->load($mime_id);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function load($mime_id) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$myrow = $this->db->fetchArray($this->db->query($sql));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function xoopsmimetypes ($mime_id=null) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->db = Database::getInstance();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// constructor
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assignVars($myrow);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->initVar('mime_id',XOBJ_DTYPE_INT,0,true,11);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->initVar('mime_status',XOBJ_DTYPE_INT,0,true,1);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->initVar('mime_types',XOBJ_DTYPE_TXTAREA,'',true,0);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function load_byExt($mime_ext) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->initVar('mime_name',XOBJ_DTYPE_TXTBOX,'',true,255);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( !empty($mime_id) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (($format=='s') || ($format=='S') || ($format=='show')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function mime_status() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function &create($isNew = true) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$tplfile = new XoopsTplfile();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$criteria->setOrder($order);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($criteria->getSort() != '') {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( is_array($mime_id) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function get_byExt( $mime_ext, $asobject=true ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} elseif ( isset($status) && ($status != -1) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function mime_ext($format='S') {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret = $this->getVar('mime_ext', $format);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret = $myts->displayTarea($ret);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $ret;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$result = $this->db->query($sql, $limit, $start);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$sql .= ' '.$criteria->renderWhere();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$mimetype_object->cleanVars()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($mimetype_object->isNew()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$myrow = $this->db->fetchArray($this->db->query($sql));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->db->quoteString($mime_name),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function mime_id() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (($format=='s') || ($format=='S') || ($format=='show')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$result) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$myts = &MyTextSanitizer::getInstance();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret = $myts->displayTarea($ret);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret = $this->getVar('mime_name', $format);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$myts = &MyTextSanitizer::getInstance();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($mimetype_object->isNew()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( !$asobject ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$sql = 'SELECT * FROM '.$this->db->prefix('mimetypes');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$criteria = new CriteriaCompo();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( is_object($OtherCriteria) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$sql .= ' '.$criteria->renderWhere();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$result = $this->db->query($sql);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list($count) = $this->db->fetchRow($result);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function insert(&$mimetype_object, $force = false) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes') {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$mimetype_object->isDirty()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$mimetype_object = new xoopsmimetypes();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret = $myts->displayTarea($ret);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$tplfile->setNew();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$criteria->setStart($start);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$criteria->add($OtherCriteria, 'AND');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$format = "UPDATE %s SET ";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$result) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$result = $this->db->query($sql, $limit, $start);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->db->prefix('mimetypes'),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->db->quoteString($mime_types),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$myrow) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$mimetype_object->assignVar('mime_id', $this->db->getInsertId() );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->setErrors($this->db->error() );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$sql = sprintf("DELETE FROM %s WHERE mperm_mime = %u", $this->db->prefix("mimetypes_perms"), $mimetype_object->getVar('mime_id'));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$result = $this->db->queryF($sql);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$myts = &MyTextSanitizer::getInstance();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this->getVar('mime_status');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $tplfile;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret[$myrow['mime_id']] = $myrow;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($whereClause != 'WHERE ()') {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$mime_status,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (false != $force) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$result = $this->db->query($sql);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
while ( $myrow = $this->db->fetchArray($result) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$limit = $criteria->getLimit();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$result) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
${$k} = $v;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$format .= "VALUES (%u, %s, %s, %s, %u)";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$sql = sprintf($format ,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $ret;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$mime_status);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->db->quoteString($mime_ext),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$criteria->setSort($sort);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$result) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$limit = $start = 0;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$sql = 'SELECT * FROM '.$this->db->prefix('mimetypes').' WHERE mime_ext=' . $this->db->quoteString($mime_ext);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $ret;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$result = $this->db->query($sql);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret[$myrow['mime_id']] = $myrow['mime_ext'] . ' - ' . $myrow['mime_name'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (false != $force) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$criteria->add(new Criteria('mime_status', $status), 'AND');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$criteria->setLimit($limit);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$sql = 'SELECT * FROM '.$this->db->prefix('mimetypes');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function getCount($criteria = null, $notNullFields='') {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$whereClause = $criteria->renderWhere();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$result) {
- Exclude checks
Line exceeds 120 characters; contains 138 characters Open
$sql = sprintf("DELETE FROM %s WHERE mperm_mime = %u", $this->db->prefix("mimetypes_perms"), $mimetype_object->getVar('mime_id'));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$result = $this->db->query($sql);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($criteria->getSort() != '') {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$limit = $criteria->getLimit();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this->getVar('mime_id');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($isNew) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret = array();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$sql = 'SELECT * FROM ' . $this->db->prefix('mimetypes') . ' WHERE mime_ext = ' . $this->db->quoteString($mime_ext);
- Exclude checks
Line exceeds 120 characters; contains 130 characters Open
function get_mimetypes($limit=20, $start=0, $status=-1, $OtherCriteria=null, $sort='mime_ext', $order='ASC', $asobject=true) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( !$asobject ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $count;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret = array();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$format .=" WHERE mime_id = %u";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ($status as $v) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (false != $force) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return 0;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ($mimetype_object->cleanVars as $k => $v) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->db->quoteString($mime_name),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$mime_id);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$result = $this->db->queryF($sql);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function mime_types($format='S') {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$result) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function mime_name($format='S') {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $ret;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( isset($status) && (is_array($status)) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret[] = new xoopsmimetypes( $myrow );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$criteria->add(new Criteria('mime_status', $v), 'AND');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret[] = new xoopsmimetypes( $myrow );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret[$myrow['mime_id']] = $myrow;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$mime_id,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->db->quoteString($mime_ext),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$format = "INSERT INTO %s (mime_id, mime_ext, mime_types, mime_name, mime_status)";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes') {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Line exceeds 120 characters; contains 129 characters Open
$sql = sprintf("DELETE FROM %s WHERE mime_id = %u", $this->db->prefix("mimetypes"), $mimetype_object->getVar('mime_id'));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->setErrors($this->db->error() );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret = array();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
while ($myrow = $this->db->fetchArray($result)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $ret;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret = $this->getVar('mime_types', $format);
- Exclude checks
Line exceeds 120 characters; contains 124 characters Open
$sql = 'SELECT * FROM ' . $this->db->prefix('mimetypes') . ' WHERE mime_ext = ' . $this->db->quoteString($mime_ext);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$force = true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->setErrors($this->db->error() );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function &GetSelectList($criteria = null) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assignVars($myrow);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->setNew();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (($format=='s') || ($format=='S') || ($format=='show')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $ret;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function get_mimetypes($limit=20, $start=0, $status=-1, $OtherCriteria=null, $sort='mime_ext', $order='ASC', $asobject=true) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$start = $criteria->getStart();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
while ( $myrow = $this->db->fetchArray($result) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$sql = 'SELECT COUNT(*) FROM '.$this->db->prefix('mimetypes');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $ret;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->db->quoteString($mime_types),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$result = $this->db->query($sql);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ( $mime_types as $mime_type ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( !in_array ($type, $ret) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->initVar('mperm_mime',XOBJ_DTYPE_INT,0,true,11);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->initVar('mperm_groups' ,XOBJ_DTYPE_TXTAREA,'',false,0);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->initVar('mperm_maxwidth' ,XOBJ_DTYPE_INT,0,true,4);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$format .="mime_ext=%s, mime_types=%s, mime_name=%s, mime_status=%u";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$sql = sprintf($format, $this->db->prefix('mimetypes'),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function delete(&$mimetype_object, $force = false) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$sql = sprintf("DELETE FROM %s WHERE mime_id = %u", $this->db->prefix("mimetypes"), $mimetype_object->getVar('mime_id'));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$result = $this->db->queryF($sql);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$sql .= ' '.$criteria->renderWhere();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$start = $criteria->getStart();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret->addOptionArray( $this->GetSelectList($criteria) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $ret;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret->addOptionArray( $this->Get_TypeList() );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function setErrors($err_str) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret = new XoopsFormSelect($caption, $name, $value, $size, $multiple);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function XoopsFormSelectType( $caption, $name, $value=null, $size=1, $multiple=false ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret = new XoopsFormSelect($caption, $name, $value, $size, $multiple);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// constructor
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$myrow) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function mime_ext($format='S') {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret = $myts->displayTarea($ret);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$groups = array();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$result = $this->db->query($sql);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $ret;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$result) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( $type = substr( $mime_type, 0, strpos($mime_type, '/') ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$mime_types = explode('|',$myrow['mime_types']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function getHtmlErrors() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ($this->_errors as $error) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this->getVar('mperm_groups');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function mperm_maxwidth() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function xoopsmimetypes_perms ($mperm_id=null) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function GetGroups() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->initVar('mperm_module' ,XOBJ_DTYPE_INT,0,true,5);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} elseif ( isset($module) && ($module != -1) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->initVar('mime_name',XOBJ_DTYPE_TXTBOX,'',true,255);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$sql = 'SELECT p.*, t.mime_ext, t.mime_name, m.name FROM ' . $this->db->prefix('mimetypes_perms') . ' p LEFT JOIN ' .
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$result = $this->db->query($sql, $limit, $start);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
while ( $myrow = $this->db->fetchArray($result) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $ret;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function mime_module($format='S') {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function getCount($criteria = null, $notNullFields='') {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function mime_name($format='S') {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$sql = 'SELECT p.mperm_groups FROM ' . $this->db->prefix('mimetypes_perms') . ' p LEFT JOIN ' .
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
while ( $myrow = $this->db->fetchArray($result) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$criteria->setLimit($limit);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->db->prefix("mimetypes") . ' t on p.mperm_mime = t.mime_id LEFT JOIN ' .
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$sql = 'SELECT * FROM ' . $this->db->prefix("mimetypes") ;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret = '<h4>Errors</h4>';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assignVars($myrow);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $ret;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret = $this->getVar('mime_name', $format);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this->getVar('mperm_status');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret[$type] = $type;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret = array();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret[$myrow['mime_id']] = $myrow;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
list($count) = $this->db->fetchRow($result);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$module_handler =& xoops_gethandler('module');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $module->name();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
var $db;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->initVar('mperm_maxsize' ,XOBJ_DTYPE_INT,0,true,8);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->db->prefix("mimetypes") . ' t on p.mperm_mime = t.mime_id LEFT JOIN ' .
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->initVar('mod_name',XOBJ_DTYPE_TXTBOX,'',true,255);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( is_array($mperm_id) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->db->prefix("modules") . ' m on p.mperm_module = m.mid' . ' WHERE mperm_id=' . $this->db->quoteString($module_id);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function mperm_mime() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this->getVar('mperm_mime');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (($format=='s') || ($format=='S') || ($format=='show')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $ret;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('mimetypes_perms') . ' p LEFT JOIN ' .
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($whereClause != 'WHERE ()') {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$result) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return 0;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$module = $module_handler->get( $mid );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( !$asobject ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->_errors[] = trim($err_str);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->db = Database::getInstance();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function mperm_module() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$myts = &MyTextSanitizer::getInstance();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function mperm_status() {
- Exclude checks
Line exceeds 120 characters; contains 167 characters Open
$this->db->prefix("mimetypes") . ' t on p.mperm_mime = t.mime_id ' . ' WHERE mperm_module=' . $this->mperm_module() . ' AND mperm_mime=' . $this->mperm_mime();
- Exclude checks
Line exceeds 120 characters; contains 125 characters Open
$sql = 'SELECT p.*, t.mime_ext, t.mime_name, m.name FROM ' . $this->db->prefix('mimetypes_perms') . ' p LEFT JOIN ' .
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( !$asobject ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$whereClause = $criteria->renderWhere();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$result = $this->db->query($sql);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assignVars($mperm_id);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->setNew();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function load($module_id) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$myrow = $this->db->fetchArray($this->db->query($sql));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$criteria->setStart($start);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret = array();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
while ( $myrow = $this->db->fetchArray($result) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret .= $error.'<br />';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->initVar('mperm_status' ,XOBJ_DTYPE_INT,0,true,1);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$sql = 'SELECT p.*, t.mime_ext, t.mime_name, m.name FROM ' . $this->db->prefix('mimetypes_perms') . ' p LEFT JOIN ' .
- Exclude checks
Line exceeds 120 characters; contains 128 characters Open
$this->db->prefix("modules") . ' m on p.mperm_module = m.mid' . ' WHERE mperm_id=' . $this->db->quoteString($module_id);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret = $this->getVar('mime_ext', $format);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret = $this->getVar('name', $format);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this->getVar('mperm_maxsize');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->db->prefix("mimetypes") . ' t on p.mperm_mime = t.mime_id ' . ' WHERE mperm_module=' . $this->mperm_module() . ' AND mperm_mime=' . $this->mperm_mime();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $ret;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!empty($this->_errors)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( !empty($mperm_id) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->setNew();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $ret;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this->getVar('mperm_maxwidth');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $groups;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function get_byMimeModule( $mime_id, $mid, $asobject=true) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$sql = 'SELECT * FROM ' . $this->db->prefix('mimetypes_perms') . ' WHERE mperm_mime = ' . $mime_id . ' AND mperm_module = ' . $mid;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$result = $this->db->query($sql);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$result) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function insert(&$mimetype_object, $force = false) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $ret;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function XoopsFormSelectMime( $caption, $name, $value=null, $size=1, $multiple=false ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$criteria = new CriteriaCompo();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function Get_TypeList() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->initVar('mperm_maxheight',XOBJ_DTYPE_INT,0,true,4);
- Exclude checks
Line exceeds 120 characters; contains 125 characters Open
$sql = 'SELECT p.*, t.mime_ext, t.mime_name, m.name FROM ' . $this->db->prefix('mimetypes_perms') . ' p LEFT JOIN ' .
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (($format=='s') || ($format=='S') || ($format=='show')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$myts = &MyTextSanitizer::getInstance();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (($format=='s') || ($format=='S') || ($format=='show')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function mime_groups() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function mperm_maxsize() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $ret;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$criteria->setOrder('ASC');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->initVar('mperm_id',XOBJ_DTYPE_INT,0,true,10);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function mime_id() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret = $myts->displayTarea($ret);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $ret;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$criteria->setSort('mime_ext');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret .= 'None<br />';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function get_mimetypes($limit=20, $start=0, $module=-1, $OtherCriteria=null, $asobject=true) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $ret;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->db->prefix("modules") . ' m on p.mperm_module = m.mid';
- Exclude checks
Line exceeds 120 characters; contains 139 characters Open
$sql = 'SELECT * FROM ' . $this->db->prefix('mimetypes_perms') . ' WHERE mperm_mime = ' . $mime_id . ' AND mperm_module = ' . $mid;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $ret;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this->getVar('mperm_maxheight');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret[] = new xoopsmimetypes_perms( $myrow );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$sql .= ' '.$criteria->renderWhere();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$result = $this->db->query($sql);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$sql .= ' '.$criteria->renderWhere() . $criteria->getGroupby();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this->getVar('mperm_module');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$myts = &MyTextSanitizer::getInstance();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ($module as $v) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$criteria->setGroupby('p.mperm_mime');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
while ( $myrow = $this->db->fetchArray($result) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->db->prefix("mimetypes") . ' t on p.mperm_mime = t.mime_id LEFT JOIN ' .
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->initVar('mime_ext',XOBJ_DTYPE_TXTBOX,'',true,10);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->load($mperm_id);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this->getVar('mperm_id');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret = $myts->displayTarea($ret);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function mperm_maxheight() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
var $_errors = array();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( isset($module) && (is_array($module)) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$start = $criteria->getStart();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $ret;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret[$myrow['mime_id']] = $myrow;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret[] = new xoopsmimetypes_perms( $myrow );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$result) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$mperm_mime,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$groups[] = $myrow['mperm_groups'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$criteria->add(new Criteria('p.mperm_module', $v), 'AND');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret = array();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->db->prefix("modules") . ' m on p.mperm_module = m.mid';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $count;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function mime_module( $mid ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($mimetype_object->isNew()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$mperm_maxsize );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (false != $force) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$criteria = new CriteriaCompo();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( is_object($OtherCriteria) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$criteria->add($OtherCriteria, 'AND');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$criteria->add(new Criteria('p.mperm_module', $module), 'AND');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$criteria->setSort('t.mime_ext');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($criteria->getSort() != '') {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$limit = $criteria->getLimit();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$mperm_maxheight,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->setErrors($this->db->error() );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$result = $this->db->queryF($sql);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$format .=" WHERE mperm_id = %u";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$mperm_status,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$result) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (false != $force) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function deletebyMimeModule(&$mimetype_object, $force = false) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$result) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$result = $this->db->query($sql);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (count($tmp) > 0) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$force = true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$format = "UPDATE %s SET ";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$result = $this->db->query($sql);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$mimetype_object->isDirty()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function delete(&$mimetype_object, $force = false) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$result) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (false != $force) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return false;
- Exclude checks
Line exceeds 120 characters; contains 129 characters Open
$sql = 'SELECT p.mperm_groups, t.mime_ext, t.mime_types FROM ' . $this->db->prefix('mimetypes_perms') . ' p LEFT JOIN ' .
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$mimetype_object = new xoopsmimetypes();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (count(array_intersect($groups,$mperm_groups)) > 0) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$mime_types = explode('|',$myrow['mime_types']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret = '<h4>Errors</h4>';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$mperm_maxheight,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$sql = sprintf($format, $this->db->prefix('mimetypes_perms'),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
${$k} = $v;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ($this->_errors as $error) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret .= $error.'<br />';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Line exceeds 120 characters; contains 152 characters Open
$format = "INSERT INTO %s (mperm_id, mperm_mime, mperm_module, mperm_groups, mperm_status, mperm_maxwidth, mperm_maxheight, mperm_maxsize)";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->db->prefix('mimetypes_perms'),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$mperm_groups,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$sql = sprintf("DELETE FROM %s WHERE mperm_module = %u AND mperm_mime = %u", $this->db->prefix("mimetypes_perms"), $mimetype_object->getVar('mperm_module'), $mimetype_object->getVar('mperm_mime'));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($mimetype_object->isNew()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$mperm_groups = explode('|',$myrow['mperm_groups']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$mperm_maxwidth,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$result = $this->db->query($sql);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
@$ret = include( XOOPS_ROOT_PATH . '/class/mimetypes.inc.php' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->setErrors($this->db->error() );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return false;
- Exclude checks
Line exceeds 120 characters; contains 141 characters Open
$sql = sprintf("DELETE FROM %s WHERE mperm_mime = %u", $this->db->prefix("mimetypes_perms"), $mimetype_object->getVar('mperm_mime'));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function setErrors($err_str) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$result = $this->db->query($sql);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$sql = sprintf("DELETE FROM %s WHERE mperm_mime = %u", $this->db->prefix("mimetypes_perms"), $mimetype_object->getVar('mperm_mime'));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
while ( $myrow = $this->db->fetchArray($result) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->setErrors($this->db->error() );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $ret;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!empty($this->_errors)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ($mimetype_object->cleanVars as $k => $v) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$mperm_mime,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$mperm_module,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return false;
- Exclude checks
Line exceeds 120 characters; contains 205 characters Open
$sql = sprintf("DELETE FROM %s WHERE mperm_module = %u AND mperm_mime = %u", $this->db->prefix("mimetypes_perms"), $mimetype_object->getVar('mperm_module'), $mimetype_object->getVar('mperm_mime'));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$result = $this->db->query($sql);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( count($ret) == 0 ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$sql = sprintf($format ,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$format .="mperm_mime=%u, mperm_module=%u, mperm_groups=%s, mperm_status=%u, mperm_maxwidth=%u, mperm_maxheight=%u, mperm_maxsize=%u";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$mimetype_object->assignVar('mime_id', $this->db->getInsertId() );
- Exclude checks
Line exceeds 120 characters; contains 137 characters Open
$sql = sprintf("DELETE FROM %s WHERE mperm_id = %u", $this->db->prefix("mimetypes_perms"), $mimetype_object->getVar('mperm_id'));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$sql = sprintf("DELETE FROM %s WHERE mperm_mime = %u AND mperm_module = %u", $this->db->prefix("mimetypes_perms"), $mimetype_object->getVar('mperm_mime'), $mimetype_object->getVar('mperm_module'));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->setErrors($this->db->error() );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret = array();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret = array_merge ($ret, $tmp);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function getHtmlErrors() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$format .= "VALUES (%u, %u, %u, %s, %u, %u, %u, %u)";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ret .= 'None<br />';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->setErrors($this->db->error() );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$result = $this->db->queryF($sql);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$mperm_status,
- Exclude checks
Line exceeds 120 characters; contains 146 characters Open
$format .="mperm_mime=%u, mperm_module=%u, mperm_groups=%s, mperm_status=%u, mperm_maxwidth=%u, mperm_maxheight=%u, mperm_maxsize=%u";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (false != $force) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$sql = sprintf("DELETE FROM %s WHERE mperm_id = %u", $this->db->prefix("mimetypes_perms"), $mimetype_object->getVar('mperm_id'));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
- Exclude checks
Line exceeds 120 characters; contains 205 characters Open
$sql = sprintf("DELETE FROM %s WHERE mperm_mime = %u AND mperm_module = %u", $this->db->prefix("mimetypes_perms"), $mimetype_object->getVar('mperm_mime'), $mimetype_object->getVar('mperm_module'));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $ret;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$mperm_id,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$mperm_maxsize,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$result = $this->db->queryF($sql);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$result) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function allowedMimeTypes( $mid, $groups, $allowedMimeTypes ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$sql = 'SELECT p.mperm_groups, t.mime_ext, t.mime_types FROM ' . $this->db->prefix('mimetypes_perms') . ' p LEFT JOIN ' .
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$mimetype_object->cleanVars()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$mperm_module,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$mperm_maxwidth,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$result = $this->db->query($sql);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function deletebyModule(&$mimetype_object, $force = false) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->db->prefix("mimetypes") . ' t on p.mperm_mime = t.mime_id WHERE mperm_module=' . $mid;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$format = "INSERT INTO %s (mperm_id, mperm_mime, mperm_module, mperm_groups, mperm_status, mperm_maxwidth, mperm_maxheight, mperm_maxsize)";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$mperm_id);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (false != $force) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
function deletebyMime(&$mimetype_object, $force = false) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$result = $this->db->queryF($sql);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->db->quoteString($mperm_groups),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$result = $this->db->queryF($sql);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$result) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->_errors[] = trim($err_str);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$tmp = array_intersect($allowedMimeTypes,$mime_types);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $ret;
- Exclude checks
No space found after comma in function call Open
$this->initVar('mime_types',XOBJ_DTYPE_TXTAREA,'',true,0);
- Exclude checks
Closing brace must be on a line by itself Open
if (!defined('XOOPS_ROOT_PATH')) { die('XOOPS root path not defined'); }
- Exclude checks
No space found after comma in function call Open
$this->initVar('mime_name',XOBJ_DTYPE_TXTBOX,'',true,255);
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( !empty($mime_id) ) {
- Exclude checks
Opening brace should be on a new line Open
function load($mime_id) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
include_once( XOOPS_ROOT_PATH . '/class/xoopsobject.php' );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
include_once( XOOPS_ROOT_PATH . '/class/xoopsobject.php' );
- Exclude checks
No space found after comma in function call Open
$this->initVar('mime_id',XOBJ_DTYPE_INT,0,true,11);
- Exclude checks
Newline required after opening brace Open
if (!defined('XOOPS_ROOT_PATH')) { die('XOOPS root path not defined'); }
- Exclude checks
No space found after comma in function call Open
$this->initVar('mime_name',XOBJ_DTYPE_TXTBOX,'',true,255);
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( is_array($mime_id) ) {
- Exclude checks
No space found after comma in function call Open
$this->initVar('mime_types',XOBJ_DTYPE_TXTAREA,'',true,0);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mime_status',XOBJ_DTYPE_INT,0,true,1);
- Exclude checks
Opening brace should be on a new line Open
function xoopsmimetypes ($mime_id=null) {
- Exclude checks
No space found after comma in function call Open
$this->initVar('mime_id',XOBJ_DTYPE_INT,0,true,11);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mime_ext',XOBJ_DTYPE_TXTBOX,'',true,10);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mime_name',XOBJ_DTYPE_TXTBOX,'',true,255);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mime_ext',XOBJ_DTYPE_TXTBOX,'',true,10);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mime_ext',XOBJ_DTYPE_TXTBOX,'',true,10);
- Exclude checks
Opening brace should be on a new line Open
function load_byExt($mime_ext) {
- Exclude checks
No space found after comma in function call Open
$this->initVar('mime_id',XOBJ_DTYPE_INT,0,true,11);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mime_name',XOBJ_DTYPE_TXTBOX,'',true,255);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mime_ext',XOBJ_DTYPE_TXTBOX,'',true,10);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mime_id',XOBJ_DTYPE_INT,0,true,11);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mime_types',XOBJ_DTYPE_TXTAREA,'',true,0);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mime_status',XOBJ_DTYPE_INT,0,true,1);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mime_status',XOBJ_DTYPE_INT,0,true,1);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mime_types',XOBJ_DTYPE_TXTAREA,'',true,0);
- Exclude checks
Opening brace should be on a new line Open
function get_byExt( $mime_ext, $asobject=true ) {
- Exclude checks
No space found after comma in function call Open
$this->initVar('mime_status',XOBJ_DTYPE_INT,0,true,1);
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$ret[] = new xoopsmimetypes( $myrow );
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 12 Open
$this->db->prefix('mimetypes'),
- Exclude checks
Opening brace should be on a new line Open
function mime_id() {
- Exclude checks
Opening brace should be on a new line Open
function get_mimetypes($limit=20, $start=0, $status=-1, $OtherCriteria=null, $sort='mime_ext', $order='ASC', $asobject=true) {
- Exclude checks
Opening brace should be on a new line Open
function mime_status() {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
while ( $myrow = $this->db->fetchArray($result) ) {
- Exclude checks
Opening parenthesis of a multi-line function call must be the last content on the line Open
$sql = sprintf($format ,
- Exclude checks
Closing parenthesis of a multi-line function call must be on a line by itself Open
$mime_status);
- Exclude checks
Opening brace should be on a new line Open
function getCount($criteria = null, $notNullFields='') {
- Exclude checks
Closing parenthesis of a multi-line function call must be on a line by itself Open
$mime_id);
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 12 Open
$this->db->quoteString($mime_types),
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->setErrors($this->db->error() );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$ret[] = new xoopsmimetypes( $myrow );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$ret[] = new xoopsmimetypes( $myrow );
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 12 Open
$mime_status,
- Exclude checks
Opening brace should be on a new line Open
function Get_TypeList() {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
while ( $myrow = $this->db->fetchArray($result) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( !$asobject ) {
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 12 Open
$this->db->quoteString($mime_name),
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->setErrors($this->db->error() );
- Exclude checks
Opening brace should be on a new line Open
function mime_ext($format='S') {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( is_object($OtherCriteria) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( isset($status) && (is_array($status)) ) {
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 12 Open
$this->db->quoteString($mime_ext),
- Exclude checks
Opening brace should be on a new line Open
function mime_types($format='S') {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$ret[] = new xoopsmimetypes( $myrow );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( !$asobject ) {
- Exclude checks
Opening brace should be on a new line Open
function insert(&$mimetype_object, $force = false) {
- Exclude checks
Opening parenthesis of a multi-line function call must be the last content on the line Open
$sql = sprintf($format, $this->db->prefix('mimetypes'),
- Exclude checks
Opening brace should be on a new line Open
function delete(&$mimetype_object, $force = false) {
- Exclude checks
Opening brace should be on a new line Open
function mime_name($format='S') {
- Exclude checks
Opening brace should be on a new line Open
function &create($isNew = true) {
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 12 Open
$this->db->quoteString($mime_ext),
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 12 Open
$this->db->quoteString($mime_types),
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
} elseif ( isset($status) && ($status != -1) ) {
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 12 Open
$mime_id,
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$mimetype_object->assignVar('mime_id', $this->db->getInsertId() );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->setErrors($this->db->error() );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$ret->addOptionArray( $this->GetSelectList($criteria) );
- Exclude checks
No space found after comma in function call Open
$this->initVar('mperm_id',XOBJ_DTYPE_INT,0,true,10);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mperm_status' ,XOBJ_DTYPE_INT,0,true,1);
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$ret->addOptionArray( $this->GetSelectList($criteria) );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
while ( $myrow = $this->db->fetchArray($result) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
foreach ( $mime_types as $mime_type ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( $type = substr( $mime_type, 0, strpos($mime_type, '/') ) ) {
- Exclude checks
No space found after comma in function call Open
$this->initVar('mperm_module' ,XOBJ_DTYPE_INT,0,true,5);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mperm_status' ,XOBJ_DTYPE_INT,0,true,1);
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 12 Open
$this->db->quoteString($mime_name),
- Exclude checks
Opening brace should be on a new line Open
function &GetSelectList($criteria = null) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( $type = substr( $mime_type, 0, strpos($mime_type, '/') ) ) {
- Exclude checks
No space found after comma in function call Open
$this->initVar('mperm_id',XOBJ_DTYPE_INT,0,true,10);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mperm_id',XOBJ_DTYPE_INT,0,true,10);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mperm_mime',XOBJ_DTYPE_INT,0,true,11);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mperm_module' ,XOBJ_DTYPE_INT,0,true,5);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mperm_maxwidth' ,XOBJ_DTYPE_INT,0,true,4);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mperm_maxwidth' ,XOBJ_DTYPE_INT,0,true,4);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mime_name',XOBJ_DTYPE_TXTBOX,'',true,255);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mperm_maxheight',XOBJ_DTYPE_INT,0,true,4);
- Exclude checks
Opening brace should be on a new line Open
function mime_module($format='S') {
- Exclude checks
Opening brace should be on a new line Open
function mime_name($format='S') {
- Exclude checks
Opening brace should be on a new line Open
function getHtmlErrors() {
- Exclude checks
No space found after comma in function call Open
$this->initVar('mperm_status' ,XOBJ_DTYPE_INT,0,true,1);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mperm_maxsize' ,XOBJ_DTYPE_INT,0,true,8);
- Exclude checks
Opening brace should be on a new line Open
function get_mimetypes($limit=20, $start=0, $module=-1, $OtherCriteria=null, $asobject=true) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( $type = substr( $mime_type, 0, strpos($mime_type, '/') ) ) {
- Exclude checks
No space found after comma in function call Open
$this->initVar('mperm_groups' ,XOBJ_DTYPE_TXTAREA,'',false,0);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mperm_maxwidth' ,XOBJ_DTYPE_INT,0,true,4);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mperm_maxheight',XOBJ_DTYPE_INT,0,true,4);
- Exclude checks
Opening brace should be on a new line Open
function mime_groups() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$ret->addOptionArray( $this->Get_TypeList() );
- Exclude checks
Opening brace should be on a new line Open
function setErrors($err_str) {
- Exclude checks
No space found after comma in function call Open
$mime_types = explode('|',$myrow['mime_types']);
- Exclude checks
Class name "XoopsMimetypes_perms" is not in camel caps format Open
class XoopsMimetypes_perms extends XoopsObject {
- Exclude checks
No space found after comma in function call Open
$this->initVar('mperm_groups' ,XOBJ_DTYPE_TXTAREA,'',false,0);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mime_name',XOBJ_DTYPE_TXTBOX,'',true,255);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mperm_mime',XOBJ_DTYPE_INT,0,true,11);
- Exclude checks
Opening brace should be on a new line Open
function mperm_mime() {
- Exclude checks
No space found after comma in function call Open
$this->initVar('mperm_module' ,XOBJ_DTYPE_INT,0,true,5);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mperm_maxwidth' ,XOBJ_DTYPE_INT,0,true,4);
- Exclude checks
Opening brace should be on a new line Open
function GetGroups() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$ret[] = new xoopsmimetypes_perms( $myrow );
- Exclude checks
Opening brace should be on a new line Open
function getCount($criteria = null, $notNullFields='') {
- Exclude checks
Opening brace should be on a new line Open
function mime_module( $mid ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$module = $module_handler->get( $mid );
- Exclude checks
No space found after comma in function call Open
$this->initVar('mperm_mime',XOBJ_DTYPE_INT,0,true,11);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mperm_maxheight',XOBJ_DTYPE_INT,0,true,4);
- Exclude checks
Opening brace should be on a new line Open
function XoopsFormSelectMime( $caption, $name, $value=null, $size=1, $multiple=false ) {
- Exclude checks
Opening brace should be on a new line Open
function xoopsmimetypes_perms ($mperm_id=null) {
- Exclude checks
No space found after comma in function call Open
$this->initVar('mperm_id',XOBJ_DTYPE_INT,0,true,10);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mperm_groups' ,XOBJ_DTYPE_TXTAREA,'',false,0);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mperm_groups' ,XOBJ_DTYPE_TXTAREA,'',false,0);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mperm_maxsize' ,XOBJ_DTYPE_INT,0,true,8);
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( !empty($mperm_id) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( is_array($mperm_id) ) {
- Exclude checks
Opening brace should be on a new line Open
function mperm_maxheight() {
- Exclude checks
Opening brace should be on a new line Open
function mperm_maxsize() {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( !$asobject ) {
- Exclude checks
No space found after comma in function call Open
$this->initVar('mperm_status' ,XOBJ_DTYPE_INT,0,true,1);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mperm_maxheight',XOBJ_DTYPE_INT,0,true,4);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mime_ext',XOBJ_DTYPE_TXTBOX,'',true,10);
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
while ( $myrow = $this->db->fetchArray($result) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( !$asobject ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$ret->addOptionArray( $this->Get_TypeList() );
- Exclude checks
No space found after comma in function call Open
$this->initVar('mod_name',XOBJ_DTYPE_TXTBOX,'',true,255);
- Exclude checks
Opening brace should be on a new line Open
function mperm_maxwidth() {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
while ( $myrow = $this->db->fetchArray($result) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$ret[] = new xoopsmimetypes_perms( $myrow );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$module = $module_handler->get( $mid );
- Exclude checks
Opening brace should be on a new line Open
function XoopsFormSelectType( $caption, $name, $value=null, $size=1, $multiple=false ) {
- Exclude checks
No space found after comma in function call Open
$this->initVar('mime_ext',XOBJ_DTYPE_TXTBOX,'',true,10);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mod_name',XOBJ_DTYPE_TXTBOX,'',true,255);
- Exclude checks
Space before opening parenthesis of function call prohibited Open
if ( !in_array ($type, $ret) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( is_object($OtherCriteria) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( isset($module) && (is_array($module)) ) {
- Exclude checks
No space found after comma in function call Open
$this->initVar('mperm_module' ,XOBJ_DTYPE_INT,0,true,5);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mime_name',XOBJ_DTYPE_TXTBOX,'',true,255);
- Exclude checks
Opening brace should be on a new line Open
function mperm_status() {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( !in_array ($type, $ret) ) {
- Exclude checks
No space found after comma in function call Open
$this->initVar('mperm_mime',XOBJ_DTYPE_INT,0,true,11);
- Exclude checks
Class name "XoopsMimetypes_permsHandler" is not in camel caps format Open
class XoopsMimetypes_permsHandler extends XoopsObjectHandler {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$ret[] = new xoopsmimetypes_perms( $myrow );
- Exclude checks
No space found after comma in function call Open
$this->initVar('mperm_maxsize' ,XOBJ_DTYPE_INT,0,true,8);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mperm_maxsize' ,XOBJ_DTYPE_INT,0,true,8);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mod_name',XOBJ_DTYPE_TXTBOX,'',true,255);
- Exclude checks
Opening brace should be on a new line Open
function mime_id() {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
while ( $myrow = $this->db->fetchArray($result) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
} elseif ( isset($module) && ($module != -1) ) {
- Exclude checks
Opening brace should be on a new line Open
function get_byMimeModule( $mime_id, $mid, $asobject=true) {
- Exclude checks
No space found after comma in function call Open
$this->initVar('mime_ext',XOBJ_DTYPE_TXTBOX,'',true,10);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mime_ext',XOBJ_DTYPE_TXTBOX,'',true,10);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mime_name',XOBJ_DTYPE_TXTBOX,'',true,255);
- Exclude checks
No space found after comma in function call Open
$this->initVar('mod_name',XOBJ_DTYPE_TXTBOX,'',true,255);
- Exclude checks
Opening brace should be on a new line Open
function load($module_id) {
- Exclude checks
Opening brace should be on a new line Open
function mperm_module() {
- Exclude checks
Opening brace should be on a new line Open
function mime_ext($format='S') {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$ret[] = new xoopsmimetypes_perms( $myrow );
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 12 Open
$mperm_status,
- Exclude checks
Closing parenthesis of a multi-line function call must be on a line by itself Open
$mperm_id);
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$mimetype_object->assignVar('mime_id', $this->db->getInsertId() );
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 12 Open
$mperm_id,
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->setErrors($this->db->error() );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
while ( $myrow = $this->db->fetchArray($result) ) {
- Exclude checks
A closing tag is not permitted at the end of a PHP file Open
?>
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 12 Open
$mperm_module,
- Exclude checks
No space found after comma in function call Open
$tmp = array_intersect($allowedMimeTypes,$mime_types);
- Exclude checks
Opening parenthesis of a multi-line function call must be the last content on the line Open
$sql = sprintf($format, $this->db->prefix('mimetypes_perms'),
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 12 Open
$mperm_status,
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->setErrors($this->db->error() );
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 12 Open
$mperm_groups,
- Exclude checks
Space before opening parenthesis of function call prohibited Open
$ret = array_merge ($ret, $tmp);
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 12 Open
$mperm_maxheight,
- Exclude checks
Opening brace should be on a new line Open
function delete(&$mimetype_object, $force = false) {
- Exclude checks
Opening brace should be on a new line Open
function getHtmlErrors() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->setErrors($this->db->error() );
- Exclude checks
No space found after comma in function call Open
$mime_types = explode('|',$myrow['mime_types']);
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->setErrors($this->db->error() );
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 12 Open
$mperm_module,
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 12 Open
$mperm_maxwidth,
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 12 Open
$mperm_maxheight,
- Exclude checks
Expected 1 newline at end of file; 0 found Open
?>
- Exclude checks
Opening parenthesis of a multi-line function call must be the last content on the line Open
$sql = sprintf($format ,
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 12 Open
$this->db->prefix('mimetypes_perms'),
- Exclude checks
No space found after comma in function call Open
$mperm_groups = explode('|',$myrow['mperm_groups']);
- Exclude checks
Space after opening parenthesis of function call prohibited Open
@$ret = include( XOOPS_ROOT_PATH . '/class/mimetypes.inc.php' );
- Exclude checks
Closing parenthesis of a multi-line function call must be on a line by itself Open
$mperm_maxsize );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( count($ret) == 0 ) {
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 12 Open
$mperm_maxsize,
- Exclude checks
Opening brace should be on a new line Open
function deletebyMimeModule(&$mimetype_object, $force = false) {
- Exclude checks
Opening brace should be on a new line Open
function deletebyMime(&$mimetype_object, $force = false) {
- Exclude checks
Opening brace should be on a new line Open
function setErrors($err_str) {
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 12 Open
$this->db->quoteString($mperm_groups),
- Exclude checks
Opening brace should be on a new line Open
function deletebyModule(&$mimetype_object, $force = false) {
- Exclude checks
Opening brace should be on a new line Open
function insert(&$mimetype_object, $force = false) {
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 12 Open
$mperm_mime,
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 12 Open
$mperm_mime,
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 12 Open
$mperm_maxwidth,
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$this->setErrors($this->db->error() );
- Exclude checks
Opening brace should be on a new line Open
function allowedMimeTypes( $mid, $groups, $allowedMimeTypes ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
@$ret = include( XOOPS_ROOT_PATH . '/class/mimetypes.inc.php' );
- Exclude checks
No space found after comma in function call Open
if (count(array_intersect($groups,$mperm_groups)) > 0) {
- Exclude checks
The variable $mime_id is not named in camelCase. Open
function xoopsmimetypes ($mime_id=null) {
$this->db = Database::getInstance();
$this->initVar('mime_id',XOBJ_DTYPE_INT,0,true,11);
$this->initVar('mime_ext',XOBJ_DTYPE_TXTBOX,'',true,10);
$this->initVar('mime_types',XOBJ_DTYPE_TXTAREA,'',true,0);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $OtherCriteria is not named in camelCase. Open
function get_mimetypes($limit=20, $start=0, $module=-1, $OtherCriteria=null, $asobject=true) {
$ret = array();
$criteria = new CriteriaCompo();
if ( is_object($OtherCriteria) ) {
$criteria->add($OtherCriteria, 'AND');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mperm_mime is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mperm_maxwidth is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mimetype_object is not named in camelCase. Open
function deletebyMimeModule(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
$sql = sprintf("DELETE FROM %s WHERE mperm_mime = %u AND mperm_module = %u", $this->db->prefix("mimetypes_perms"), $mimetype_object->getVar('mperm_mime'), $mimetype_object->getVar('mperm_module'));
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mime_ext is not named in camelCase. Open
function load_byExt($mime_ext) {
$sql = 'SELECT * FROM '.$this->db->prefix('mimetypes').' WHERE mime_ext=' . $this->db->quoteString($mime_ext);
$myrow = $this->db->fetchArray($this->db->query($sql));
$this->assignVars($myrow);
if (!$myrow) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mimetype_object is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mimetype_object is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mime_status is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mimetype_object is not named in camelCase. Open
function delete(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes') {
return false;
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mime_id is not named in camelCase. Open
function get_byMimeModule( $mime_id, $mid, $asobject=true) {
$ret = array();
$sql = 'SELECT * FROM ' . $this->db->prefix('mimetypes_perms') . ' WHERE mperm_mime = ' . $mime_id . ' AND mperm_module = ' . $mid;
$result = $this->db->query($sql);
if (!$result) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mperm_maxheight is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mime_types is not named in camelCase. Open
function allowedMimeTypes( $mid, $groups, $allowedMimeTypes ) {
$ret = array();
$sql = 'SELECT p.mperm_groups, t.mime_ext, t.mime_types FROM ' . $this->db->prefix('mimetypes_perms') . ' p LEFT JOIN ' .
$this->db->prefix("mimetypes") . ' t on p.mperm_mime = t.mime_id WHERE mperm_module=' . $mid;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $OtherCriteria is not named in camelCase. Open
function get_mimetypes($limit=20, $start=0, $status=-1, $OtherCriteria=null, $sort='mime_ext', $order='ASC', $asobject=true) {
$ret = array();
$criteria = new CriteriaCompo();
if ( is_object($OtherCriteria) ) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mimetype_object is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mime_ext is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mimetype_object is not named in camelCase. Open
function delete(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes') {
return false;
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $OtherCriteria is not named in camelCase. Open
function get_mimetypes($limit=20, $start=0, $module=-1, $OtherCriteria=null, $asobject=true) {
$ret = array();
$criteria = new CriteriaCompo();
if ( is_object($OtherCriteria) ) {
$criteria->add($OtherCriteria, 'AND');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mimetype_object is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mperm_module is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mperm_status is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mimetype_object is not named in camelCase. Open
function delete(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
$sql = sprintf("DELETE FROM %s WHERE mperm_id = %u", $this->db->prefix("mimetypes_perms"), $mimetype_object->getVar('mperm_id'));
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mime_id is not named in camelCase. Open
function load($mime_id) {
$sql = 'SELECT * FROM '.$this->db->prefix('mimetypes').' WHERE mime_id='.$mime_id;
$myrow = $this->db->fetchArray($this->db->query($sql));
$this->assignVars($myrow);
if (!$myrow) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mimetype_object is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mperm_mime is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mimetype_object is not named in camelCase. Open
function deletebyMime(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
$sql = sprintf("DELETE FROM %s WHERE mperm_mime = %u", $this->db->prefix("mimetypes_perms"), $mimetype_object->getVar('mperm_mime'));
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mperm_module is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mimetype_object is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mimetype_object is not named in camelCase. Open
function deletebyModule(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mime_types is not named in camelCase. Open
function allowedMimeTypes( $mid, $groups, $allowedMimeTypes ) {
$ret = array();
$sql = 'SELECT p.mperm_groups, t.mime_ext, t.mime_types FROM ' . $this->db->prefix('mimetypes_perms') . ' p LEFT JOIN ' .
$this->db->prefix("mimetypes") . ' t on p.mperm_mime = t.mime_id WHERE mperm_module=' . $mid;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mimetype_object is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mperm_id is not named in camelCase. Open
function xoopsmimetypes_perms ($mperm_id=null) {
$this->db = Database::getInstance();
$this->initVar('mperm_id',XOBJ_DTYPE_INT,0,true,10);
$this->initVar('mperm_mime',XOBJ_DTYPE_INT,0,true,11);
$this->initVar('mperm_module' ,XOBJ_DTYPE_INT,0,true,5);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $module_id is not named in camelCase. Open
function load($module_id) {
$sql = 'SELECT p.*, t.mime_ext, t.mime_name, m.name FROM ' . $this->db->prefix('mimetypes_perms') . ' p LEFT JOIN ' .
$this->db->prefix("mimetypes") . ' t on p.mperm_mime = t.mime_id LEFT JOIN ' .
$this->db->prefix("modules") . ' m on p.mperm_module = m.mid' . ' WHERE mperm_id=' . $this->db->quoteString($module_id);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mperm_groups is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mperm_status is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mperm_maxsize is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mperm_groups is not named in camelCase. Open
function allowedMimeTypes( $mid, $groups, $allowedMimeTypes ) {
$ret = array();
$sql = 'SELECT p.mperm_groups, t.mime_ext, t.mime_types FROM ' . $this->db->prefix('mimetypes_perms') . ' p LEFT JOIN ' .
$this->db->prefix("mimetypes") . ' t on p.mperm_mime = t.mime_id WHERE mperm_module=' . $mid;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mime_ext is not named in camelCase. Open
function get_byExt( $mime_ext, $asobject=true ) {
$ret = array();
$sql = 'SELECT * FROM ' . $this->db->prefix('mimetypes') . ' WHERE mime_ext = ' . $this->db->quoteString($mime_ext);
$result = $this->db->query($sql);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mperm_id is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mimetype_object is not named in camelCase. Open
function deletebyModule(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mimetype_object is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mime_type is not named in camelCase. Open
function Get_TypeList() {
$ret = array();
$sql = 'SELECT * FROM ' . $this->db->prefix("mimetypes") ;
$result = $this->db->query($sql);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $module_handler is not named in camelCase. Open
function mime_module( $mid ) {
$module_handler =& xoops_gethandler('module');
$module = $module_handler->get( $mid );
return $module->name();
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mimetype_object is not named in camelCase. Open
function deletebyMimeModule(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
$sql = sprintf("DELETE FROM %s WHERE mperm_mime = %u AND mperm_module = %u", $this->db->prefix("mimetypes_perms"), $mimetype_object->getVar('mperm_mime'), $mimetype_object->getVar('mperm_module'));
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mimetype_object is not named in camelCase. Open
function deletebyModule(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mime_ext is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mime_name is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mimetype_object is not named in camelCase. Open
function delete(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes') {
return false;
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $module_handler is not named in camelCase. Open
function mime_module( $mid ) {
$module_handler =& xoops_gethandler('module');
$module = $module_handler->get( $mid );
return $module->name();
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mperm_maxsize is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mimetype_object is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mimetype_object is not named in camelCase. Open
function deletebyMimeModule(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
$sql = sprintf("DELETE FROM %s WHERE mperm_mime = %u AND mperm_module = %u", $this->db->prefix("mimetypes_perms"), $mimetype_object->getVar('mperm_mime'), $mimetype_object->getVar('mperm_module'));
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mperm_groups is not named in camelCase. Open
function allowedMimeTypes( $mid, $groups, $allowedMimeTypes ) {
$ret = array();
$sql = 'SELECT p.mperm_groups, t.mime_ext, t.mime_types FROM ' . $this->db->prefix('mimetypes_perms') . ' p LEFT JOIN ' .
$this->db->prefix("mimetypes") . ' t on p.mperm_mime = t.mime_id WHERE mperm_module=' . $mid;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $err_str is not named in camelCase. Open
function setErrors($err_str) {
$this->_errors[] = trim($err_str);
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mime_id is not named in camelCase. Open
function xoopsmimetypes ($mime_id=null) {
$this->db = Database::getInstance();
$this->initVar('mime_id',XOBJ_DTYPE_INT,0,true,11);
$this->initVar('mime_ext',XOBJ_DTYPE_TXTBOX,'',true,10);
$this->initVar('mime_types',XOBJ_DTYPE_TXTAREA,'',true,0);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mperm_id is not named in camelCase. Open
function xoopsmimetypes_perms ($mperm_id=null) {
$this->db = Database::getInstance();
$this->initVar('mperm_id',XOBJ_DTYPE_INT,0,true,10);
$this->initVar('mperm_mime',XOBJ_DTYPE_INT,0,true,11);
$this->initVar('mperm_module' ,XOBJ_DTYPE_INT,0,true,5);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mperm_id is not named in camelCase. Open
function xoopsmimetypes_perms ($mperm_id=null) {
$this->db = Database::getInstance();
$this->initVar('mperm_id',XOBJ_DTYPE_INT,0,true,10);
$this->initVar('mperm_mime',XOBJ_DTYPE_INT,0,true,11);
$this->initVar('mperm_module' ,XOBJ_DTYPE_INT,0,true,5);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mperm_groups is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mimetype_object is not named in camelCase. Open
function delete(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
$sql = sprintf("DELETE FROM %s WHERE mperm_id = %u", $this->db->prefix("mimetypes_perms"), $mimetype_object->getVar('mperm_id'));
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mime_id is not named in camelCase. Open
function xoopsmimetypes ($mime_id=null) {
$this->db = Database::getInstance();
$this->initVar('mime_id',XOBJ_DTYPE_INT,0,true,11);
$this->initVar('mime_ext',XOBJ_DTYPE_TXTBOX,'',true,10);
$this->initVar('mime_types',XOBJ_DTYPE_TXTAREA,'',true,0);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mimetype_object is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mime_name is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mimetype_object is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mime_types is not named in camelCase. Open
function Get_TypeList() {
$ret = array();
$sql = 'SELECT * FROM ' . $this->db->prefix("mimetypes") ;
$result = $this->db->query($sql);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mperm_id is not named in camelCase. Open
function xoopsmimetypes_perms ($mperm_id=null) {
$this->db = Database::getInstance();
$this->initVar('mperm_id',XOBJ_DTYPE_INT,0,true,10);
$this->initVar('mperm_mime',XOBJ_DTYPE_INT,0,true,11);
$this->initVar('mperm_module' ,XOBJ_DTYPE_INT,0,true,5);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mperm_maxwidth is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mimetype_object is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mime_id is not named in camelCase. Open
function xoopsmimetypes ($mime_id=null) {
$this->db = Database::getInstance();
$this->initVar('mime_id',XOBJ_DTYPE_INT,0,true,11);
$this->initVar('mime_ext',XOBJ_DTYPE_TXTBOX,'',true,10);
$this->initVar('mime_types',XOBJ_DTYPE_TXTAREA,'',true,0);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $OtherCriteria is not named in camelCase. Open
function get_mimetypes($limit=20, $start=0, $status=-1, $OtherCriteria=null, $sort='mime_ext', $order='ASC', $asobject=true) {
$ret = array();
$criteria = new CriteriaCompo();
if ( is_object($OtherCriteria) ) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $err_str is not named in camelCase. Open
function setErrors($err_str) {
$this->_errors[] = trim($err_str);
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mimetype_object is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mime_id is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mime_id is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mime_type is not named in camelCase. Open
function Get_TypeList() {
$ret = array();
$sql = 'SELECT * FROM ' . $this->db->prefix("mimetypes") ;
$result = $this->db->query($sql);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mimetype_object is not named in camelCase. Open
function deletebyMime(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
$sql = sprintf("DELETE FROM %s WHERE mperm_mime = %u", $this->db->prefix("mimetypes_perms"), $mimetype_object->getVar('mperm_mime'));
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mimetype_object is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mime_types is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mime_status is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mime_types is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mime_types is not named in camelCase. Open
function Get_TypeList() {
$ret = array();
$sql = 'SELECT * FROM ' . $this->db->prefix("mimetypes") ;
$result = $this->db->query($sql);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mime_type is not named in camelCase. Open
function Get_TypeList() {
$ret = array();
$sql = 'SELECT * FROM ' . $this->db->prefix("mimetypes") ;
$result = $this->db->query($sql);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mimetype_object is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mimetype_object is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mperm_id is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $mperm_maxheight is not named in camelCase. Open
function insert(&$mimetype_object, $force = false) {
if (strtolower(get_class($mimetype_object)) != 'xoopsmimetypes_perms') {
return false;
}
if (!$mimetype_object->isDirty()) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The method mime_module is not named in camelCase. Open
function mime_module( $mid ) {
$module_handler =& xoops_gethandler('module');
$module = $module_handler->get( $mid );
return $module->name();
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method mime_status is not named in camelCase. Open
function mime_status() {
return $this->getVar('mime_status');
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method mime_ext is not named in camelCase. Open
function mime_ext($format='S') {
$ret = $this->getVar('mime_ext', $format);
if (($format=='s') || ($format=='S') || ($format=='show')) {
$myts = &MyTextSanitizer::getInstance();
$ret = $myts->displayTarea($ret);
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method mime_ext is not named in camelCase. Open
function mime_ext($format='S') {
$ret = $this->getVar('mime_ext', $format);
if (($format=='s') || ($format=='S') || ($format=='show')) {
$myts = &MyTextSanitizer::getInstance();
$ret = $myts->displayTarea($ret);
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method mperm_maxwidth is not named in camelCase. Open
function mperm_maxwidth() {
return $this->getVar('mperm_maxwidth');
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method get_mimetypes is not named in camelCase. Open
function get_mimetypes($limit=20, $start=0, $module=-1, $OtherCriteria=null, $asobject=true) {
$ret = array();
$criteria = new CriteriaCompo();
if ( is_object($OtherCriteria) ) {
$criteria->add($OtherCriteria, 'AND');
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method get_byExt is not named in camelCase. Open
function get_byExt( $mime_ext, $asobject=true ) {
$ret = array();
$sql = 'SELECT * FROM ' . $this->db->prefix('mimetypes') . ' WHERE mime_ext = ' . $this->db->quoteString($mime_ext);
$result = $this->db->query($sql);
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method get_mimetypes is not named in camelCase. Open
function get_mimetypes($limit=20, $start=0, $status=-1, $OtherCriteria=null, $sort='mime_ext', $order='ASC', $asobject=true) {
$ret = array();
$criteria = new CriteriaCompo();
if ( is_object($OtherCriteria) ) {
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method mperm_module is not named in camelCase. Open
function mperm_module() {
return $this->getVar('mperm_module');
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method get_byMimeModule is not named in camelCase. Open
function get_byMimeModule( $mime_id, $mid, $asobject=true) {
$ret = array();
$sql = 'SELECT * FROM ' . $this->db->prefix('mimetypes_perms') . ' WHERE mperm_mime = ' . $mime_id . ' AND mperm_module = ' . $mid;
$result = $this->db->query($sql);
if (!$result) {
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method XoopsFormSelectType is not named in camelCase. Open
function XoopsFormSelectType( $caption, $name, $value=null, $size=1, $multiple=false ) {
$ret = new XoopsFormSelect($caption, $name, $value, $size, $multiple);
$ret->addOptionArray( $this->Get_TypeList() );
return $ret;
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method mime_name is not named in camelCase. Open
function mime_name($format='S') {
$ret = $this->getVar('mime_name', $format);
if (($format=='s') || ($format=='S') || ($format=='show')) {
$myts = &MyTextSanitizer::getInstance();
$ret = $myts->displayTarea($ret);
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method xoopsmimetypes_perms is not named in camelCase. Open
function xoopsmimetypes_perms ($mperm_id=null) {
$this->db = Database::getInstance();
$this->initVar('mperm_id',XOBJ_DTYPE_INT,0,true,10);
$this->initVar('mperm_mime',XOBJ_DTYPE_INT,0,true,11);
$this->initVar('mperm_module' ,XOBJ_DTYPE_INT,0,true,5);
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method load_byExt is not named in camelCase. Open
function load_byExt($mime_ext) {
$sql = 'SELECT * FROM '.$this->db->prefix('mimetypes').' WHERE mime_ext=' . $this->db->quoteString($mime_ext);
$myrow = $this->db->fetchArray($this->db->query($sql));
$this->assignVars($myrow);
if (!$myrow) {
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method GetSelectList is not named in camelCase. Open
function &GetSelectList($criteria = null) {
$ret = array();
$limit = $start = 0;
$sql = 'SELECT * FROM '.$this->db->prefix('mimetypes');
if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method mperm_maxsize is not named in camelCase. Open
function mperm_maxsize() {
return $this->getVar('mperm_maxsize');
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method XoopsFormSelectMime is not named in camelCase. Open
function XoopsFormSelectMime( $caption, $name, $value=null, $size=1, $multiple=false ) {
$ret = new XoopsFormSelect($caption, $name, $value, $size, $multiple);
$criteria = new CriteriaCompo();
$criteria->setSort('mime_ext');
$ret->addOptionArray( $this->GetSelectList($criteria) );
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method mperm_status is not named in camelCase. Open
function mperm_status() {
return $this->getVar('mperm_status');
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method GetGroups is not named in camelCase. Open
function GetGroups() {
$groups = array();
$sql = 'SELECT p.mperm_groups FROM ' . $this->db->prefix('mimetypes_perms') . ' p LEFT JOIN ' .
$this->db->prefix("mimetypes") . ' t on p.mperm_mime = t.mime_id ' . ' WHERE mperm_module=' . $this->mperm_module() . ' AND mperm_mime=' . $this->mperm_mime();
$result = $this->db->query($sql);
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method mime_id is not named in camelCase. Open
function mime_id() {
return $this->getVar('mperm_id');
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method mime_module is not named in camelCase. Open
function mime_module($format='S') {
$ret = $this->getVar('name', $format);
if (($format=='s') || ($format=='S') || ($format=='show')) {
$myts = &MyTextSanitizer::getInstance();
$ret = $myts->displayTarea($ret);
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method mime_name is not named in camelCase. Open
function mime_name($format='S') {
$ret = $this->getVar('mime_name', $format);
if (($format=='s') || ($format=='S') || ($format=='show')) {
$myts = &MyTextSanitizer::getInstance();
$ret = $myts->displayTarea($ret);
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method mime_groups is not named in camelCase. Open
function mime_groups() {
return $this->getVar('mperm_groups');
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method mime_types is not named in camelCase. Open
function mime_types($format='S') {
$ret = $this->getVar('mime_types', $format);
if (($format=='s') || ($format=='S') || ($format=='show')) {
$myts = &MyTextSanitizer::getInstance();
$ret = $myts->displayTarea($ret);
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method mime_id is not named in camelCase. Open
function mime_id() {
return $this->getVar('mime_id');
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method Get_TypeList is not named in camelCase. Open
function Get_TypeList() {
$ret = array();
$sql = 'SELECT * FROM ' . $this->db->prefix("mimetypes") ;
$result = $this->db->query($sql);
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method mperm_mime is not named in camelCase. Open
function mperm_mime() {
return $this->getVar('mperm_mime');
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method mperm_maxheight is not named in camelCase. Open
function mperm_maxheight() {
return $this->getVar('mperm_maxheight');
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}