class/PublicWallUpdates.php 1 location
|
@@ 287-294 (lines=8) @@
|
284 |
|
* @param int $userid |
285 |
|
* @return int |
286 |
|
*/ |
287 |
|
public function countMsges($userid) |
288 |
|
{ |
289 |
|
$sql = 'SELECT (SELECT COUNT(*) FROM ' . $GLOBALS['xoopsDB']->prefix('smallworld_comments') . " WHERE uid_fk = '" . $userid . "') + (SELECT COUNT(*) FROM " . $GLOBALS['xoopsDB']->prefix('smallworld_messages') . " WHERE uid_fk = '" . $userid . "')"; |
290 |
|
$result = $GLOBALS['xoopsDB']->queryF($sql); |
291 |
|
$sum = $GLOBALS['xoopsDB']->fetchRow($result); |
292 |
|
|
293 |
|
return $sum[0]; |
294 |
|
} |
295 |
|
|
296 |
|
/** |
297 |
|
* Show permaling updates |
class/WallUpdates.php 1 location
|
@@ 355-362 (lines=8) @@
|
352 |
|
* @param int $userid |
353 |
|
* @return int |
354 |
|
*/ |
355 |
|
public function countMsges($userid) |
356 |
|
{ |
357 |
|
$sql = 'SELECT (SELECT COUNT(*) FROM ' . $GLOBALS['xoopsDB']->prefix('smallworld_comments') . " WHERE uid_fk = '" . $userid . "') + (SELECT COUNT(*) FROM " . $GLOBALS['xoopsDB']->prefix('smallworld_messages') . " WHERE uid_fk = '" . $userid . "')"; |
358 |
|
$result = $GLOBALS['xoopsDB']->queryF($sql); |
359 |
|
$sum = $GLOBALS['xoopsDB']->fetchRow($result); |
360 |
|
|
361 |
|
return $sum[0]; |
362 |
|
} |
363 |
|
|
364 |
|
/** |
365 |
|
* Show permalink updates |
class/SwDatabase.php 1 location
|
@@ 579-587 (lines=9) @@
|
576 |
|
* @param int $smallworld_com_id |
577 |
|
* @return true |
578 |
|
*/ |
579 |
|
public function deleteWallComment($smallworld_com_id) |
580 |
|
{ |
581 |
|
$query = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('smallworld_comments') . " WHERE com_id = '" . $smallworld_com_id . "'"; |
582 |
|
$result = $GLOBALS['xoopsDB']->queryF($query); |
583 |
|
$query2 = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('smallworld_vote') . " WHERE com_id = '" . $smallworld_com_id . "'"; |
584 |
|
$result2 = $GLOBALS['xoopsDB']->queryF($query2); |
585 |
|
|
586 |
|
return true; |
587 |
|
} |
588 |
|
|
589 |
|
/** |
590 |
|
* Count Users rates |