class/publicWall.php 1 location
|
@@ 273-280 (lines=8) @@
|
| 270 |
|
* @param int $userid |
| 271 |
|
* @return int |
| 272 |
|
*/ |
| 273 |
|
public function CountMsges($userid) |
| 274 |
|
{ |
| 275 |
|
global $xoopsDB; |
| 276 |
|
$sql = 'SELECT (SELECT COUNT(*) FROM ' . $xoopsDB->prefix('smallworld_comments') . " WHERE uid_fk = '" . $userid . "') + (SELECT COUNT(*) FROM " . $xoopsDB->prefix('smallworld_messages') . " WHERE uid_fk = '" . $userid . "')"; |
| 277 |
|
$result = $xoopsDB->queryF($sql); |
| 278 |
|
$sum = $xoopsDB->fetchRow($result); |
| 279 |
|
return $sum[0]; |
| 280 |
|
} |
| 281 |
|
|
| 282 |
|
/** |
| 283 |
|
* @Show permaling updates |
class/SwDatabase.php 1 location
|
@@ 166-173 (lines=8) @@
|
| 163 |
|
* @param string $field |
| 164 |
|
* @param int $value |
| 165 |
|
*/ |
| 166 |
|
public function updateSingleValue($table, $userid, $field, $value) |
| 167 |
|
{ |
| 168 |
|
$myts = \MyTextSanitizer::getInstance(); |
| 169 |
|
$sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix($table) . ' SET ' . $field . "='" . $myts->addSlashes($value) . "' WHERE userid='" . (int)$userid . "'"; |
| 170 |
|
$result = $GLOBALS['xoopsDB']->queryF($sql); |
| 171 |
|
|
| 172 |
|
return $result; |
| 173 |
|
} |
| 174 |
|
|
| 175 |
|
/** |
| 176 |
|
* saveImage function |
class/wall.php 1 location
|
@@ 332-339 (lines=8) @@
|
| 329 |
|
* @param int $userid |
| 330 |
|
* @return int |
| 331 |
|
*/ |
| 332 |
|
public function CountMsges($userid) |
| 333 |
|
{ |
| 334 |
|
global $xoopsDB; |
| 335 |
|
$sql = 'SELECT (SELECT COUNT(*) FROM ' . $xoopsDB->prefix('smallworld_comments') . " WHERE uid_fk = '" . $userid . "') + (SELECT COUNT(*) FROM " . $xoopsDB->prefix('smallworld_messages') . " WHERE uid_fk = '" . $userid . "')"; |
| 336 |
|
$result = $xoopsDB->queryF($sql); |
| 337 |
|
$sum = $xoopsDB->fetchRow($result); |
| 338 |
|
return $sum[0]; |
| 339 |
|
} |
| 340 |
|
|
| 341 |
|
/** |
| 342 |
|
* @Show permaling updates |