| @@ 1322-1330 (lines=9) @@ | ||
| 1319 | * @param $table |
|
| 1320 | * @return mixed |
|
| 1321 | */ |
|
| 1322 | public static function isTermPresent($term, $table) |
|
| 1323 | { |
|
| 1324 | global $xoopsDB; |
|
| 1325 | $sql = sprintf('SELECT COUNT(*) FROM %s WHERE term = %s', $table, $xoopsDB->quoteString(addslashes($term))); |
|
| 1326 | $result = $xoopsDB->query($sql); |
|
| 1327 | list($count) = $xoopsDB->fetchRow($result); |
|
| 1328 | ||
| 1329 | return $count; |
|
| 1330 | } |
|
| 1331 | ||
| 1332 | // Static method to get author data block authors - from AMS |
|
| 1333 | /** |
|
| @@ 902-909 (lines=8) @@ | ||
| 899 | } |
|
| 900 | ||
| 901 | // Verify that a term does not exist for submissions and requests (both user frontend and admin backend) |
|
| 902 | function lx_TermExists($term, $table) { |
|
| 903 | global $xoopsDB; |
|
| 904 | $sql = sprintf('SELECT COUNT(*) FROM %s WHERE term = %s', $table, $xoopsDB->quoteString(addslashes($term))); |
|
| 905 | $result = $xoopsDB->query($sql); |
|
| 906 | list($count) = $xoopsDB->fetchRow($result); |
|
| 907 | ||
| 908 | return($count); |
|
| 909 | } |
|
| 910 | ||
| 911 | // Static method to get author data block authors - from AMS |
|
| 912 | function lexikon_block_getAuthors($limit = 5, $sort = "count", $name = 'uname', $compute_method = "average") { |
|