Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mambax7 committed Feb 26, 2017
1 parent c92e391 commit c677ea0
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 18 deletions.
4 changes: 2 additions & 2 deletions admin/admin.php
Expand Up @@ -92,7 +92,7 @@
}
}

if (false != $error) {
if (false !== $error) {
xoops_cp_header();
echo '<h4>System Configuration</h4>';
echo '<table class="outer" cellpadding="4" cellspacing="1">';
Expand All @@ -114,7 +114,7 @@
include $admin_dir . '/' . $file . '/xoops_version.php';
if ($modversion['hasAdmin']) {
$category = isset($modversion['category']) ? (int)$modversion['category'] : 0;
if (false != $all_ok || in_array($modversion['category'], $ok_syscats)) {
if (false !== $all_ok || in_array($modversion['category'], $ok_syscats)) {
echo "<td class='$class' align='center' valign='bottom' width='19%'>";
echo "<a href='" . XOOPS_URL . '/modules/system/admin.php?fct=' . $file . "'><b>" . trim($modversion['name']) . "</b></a>\n";
echo '</td>';
Expand Down
2 changes: 1 addition & 1 deletion admin/category.php
Expand Up @@ -24,7 +24,7 @@
$startcategory = isset($_GET['startcategory']) ? (int)$_GET['startcategory'] : 0;

/**
* @param $categoryObj
* @param XoopsObject $categoryObj
* @param int $level
*/
function displayCategory($categoryObj, $level = 0)
Expand Down
2 changes: 1 addition & 1 deletion admin/mygroupperm.php
Expand Up @@ -52,7 +52,7 @@ function myDeleteByModule(XoopsDatabase $db, $gperm_modid, $gperm_name = null, $
// echo "<pre>" ;
// var_dump( $HTTP_POST_VARS['perms'] ) ;
// exit ;
if (false != myDeleteByModule($gpermHandler->db, $modid, $perm_name, $item_id)) {
if (false !== myDeleteByModule($gpermHandler->db, $modid, $perm_name, $item_id)) {
if (empty($perm_data['groups'])) {
continue;
}
Expand Down
6 changes: 2 additions & 4 deletions class/answer.php
Expand Up @@ -384,9 +384,7 @@ public function sendNotifications($notifications = array())
case _SF_NOT_ANSWER_APPROVED:
// This notification is not working for PM, but is for email... and I don't understand why???
$notificationHandler->triggerEvent('faq', $this->answerid(), 'answer_approved', $tags);

break;

case -1:
default:
break;
Expand Down Expand Up @@ -480,7 +478,7 @@ public function insert(XoopsObject $answerObj, $force = false)
$this->db->quoteString($answer), $uid, $datesub, $notifypub, $answerid);
}

if (false != $force) {
if (false !== $force) {
$result = $this->db->queryF($sql);
} else {
$result = $this->db->query($sql);
Expand Down Expand Up @@ -515,7 +513,7 @@ public function delete(XoopsObject $answer, $force = false)

//echo "<br>" . $sql . "<br>";

if (false != $force) {
if (false !== $force) {
$result = $this->db->queryF($sql);
} else {
$result = $this->db->query($sql);
Expand Down
4 changes: 2 additions & 2 deletions class/category.php
Expand Up @@ -338,7 +338,7 @@ public function insert(XoopsObject $category, $force = false)
$sql = sprintf('UPDATE %s SET parentid = %u, name = %s, description = %s, total = %s, weight = %u, created = %u WHERE categoryid = %u', $this->db->prefix('smartfaq_categories'), $parentid,
$this->db->quoteString($name), $this->db->quoteString($description), $total, $weight, $created, $categoryid);
}
if (false != $force) {
if (false !== $force) {
$result = $this->db->queryF($sql);
} else {
$result = $this->db->query($sql);
Expand Down Expand Up @@ -385,7 +385,7 @@ public function delete(XoopsObject $category, $force = false)
$smartModule = sf_getModuleInfo();
$module_id = $smartModule->getVar('mid');

if (false != $force) {
if (false !== $force) {
$result = $this->db->queryF($sql);
} else {
$result = $this->db->query($sql);
Expand Down
6 changes: 3 additions & 3 deletions class/faq.php
Expand Up @@ -618,7 +618,7 @@ public function getWhoAndWhen($answerObj = null, $users = array())
$requestdate = $this->datesub();

if (($this->status() == _SF_STATUS_PUBLISHED) || $this->status() == _SF_STATUS_NEW_ANSWER) {
if ($answerObj == null) {
if ($answerObj === null) {
$answerObj = $this->answer();
}
$submitdate = $answerObj->datesub();
Expand Down Expand Up @@ -787,7 +787,7 @@ public function insert(XoopsObject $faq, $force = false)
$counter, $weight, $html, $smiley, $xcodes, $cancomment, $comments, $notifypub, $this->db->quoteString($modulelink), $this->db->quoteString($contextpage), $exacturl,
$partialview, $faqid);
}
if (false != $force) {
if (false !== $force) {
$result = $this->db->queryF($sql);
} else {
$result = $this->db->query($sql);
Expand Down Expand Up @@ -831,7 +831,7 @@ public function delete(XoopsObject $faq, $force = false)

$sql = sprintf('DELETE FROM %s WHERE faqid = %u', $this->db->prefix('smartfaq_faq'), $faq->getVar('faqid'));

if (false != $force) {
if (false !== $force) {
$result = $this->db->queryF($sql);
} else {
$result = $this->db->query($sql);
Expand Down
2 changes: 1 addition & 1 deletion class/permission.php
Expand Up @@ -26,7 +26,7 @@ public function getPermissions($type = 'category', $id = null)
global $xoopsUser;
static $permissions;

if (!isset($permissions[$type]) || ($id != null && !isset($permissions[$type][$id]))) {
if (!isset($permissions[$type]) || ($id !== null && !isset($permissions[$type][$id]))) {
$smartModule = sf_getModuleInfo();
//Get group permissions handler
$gpermHandler = xoops_getHandler('groupperm');
Expand Down
2 changes: 1 addition & 1 deletion include/functions.image.php
Expand Up @@ -110,7 +110,7 @@ function sf_createThumbnail($source, $thumb_width)

$imginfo = @getimagesize($src_file);

if (null == $imginfo) {
if (null === $imginfo) {
return false;
}
if ($imginfo[0] < $thumb_width) {
Expand Down
2 changes: 1 addition & 1 deletion include/functions.php
Expand Up @@ -87,7 +87,7 @@ function sf_formatErrors($errors = array())
}

/**
* @param $categoryObj
* @param XoopsObject $categoryObj
* @param int $selectedid
* @param int $level
* @param string $ret
Expand Down
4 changes: 2 additions & 2 deletions include/onupdate.inc.php
Expand Up @@ -3,7 +3,7 @@
// defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');

/**
* @param $module
* @param XoopsModule $module
* @return bool
*/
function xoops_module_update_smartfaq($module)
Expand Down Expand Up @@ -97,7 +97,7 @@ function xoops_module_update_smartfaq($module)
}

/**
* @param $module
* @param XoopsModule $module
* @return bool
*/
function xoops_module_install_smartfaq($module)
Expand Down

0 comments on commit c677ea0

Please sign in to comment.