@@ 244-259 (lines=16) @@ | ||
241 | * @param int $me |
|
242 | * @return array |
|
243 | */ |
|
244 | public function getFollowers($me) |
|
245 | { |
|
246 | global $xoopsDB, $xoopsUser; |
|
247 | $query = 'SELECT you FROM ' . $xoopsDB->prefix('smallworld_followers') . " WHERE me = '" . $me . "'"; |
|
248 | $result = $xoopsDB->queryF($query); |
|
249 | $i = $xoopsDB->getRowsNum($result); |
|
250 | while ($row = $xoopsDB->fetchArray($result)) { |
|
251 | $data[] = $row; |
|
252 | } |
|
253 | if (0 == $i) { |
|
254 | $data = [$me]; |
|
255 | } |
|
256 | if (!empty($data)) { |
|
257 | return $data; |
|
258 | } |
|
259 | } |
|
260 | ||
261 | /** |
|
262 | * @count all votes |
@@ 249-264 (lines=16) @@ | ||
246 | * @param int $me |
|
247 | * @return array |
|
248 | */ |
|
249 | public function getFollowers($me) |
|
250 | { |
|
251 | global $xoopsDB, $xoopsUser; |
|
252 | $query = 'SELECT you FROM ' . $xoopsDB->prefix('smallworld_followers') . " WHERE me = '" . $me . "'"; |
|
253 | $result = $xoopsDB->queryF($query); |
|
254 | $i = $xoopsDB->getRowsNum($result); |
|
255 | while ($row = $xoopsDB->fetchArray($result)) { |
|
256 | $data[] = $row; |
|
257 | } |
|
258 | if (0 == $i) { |
|
259 | $data = [$me]; |
|
260 | } |
|
261 | if (!empty($data)) { |
|
262 | return $data; |
|
263 | } |
|
264 | } |
|
265 | ||
266 | /** |
|
267 | * @count all votes |