Skip to content
Permalink
Browse files

sql query truncated in forest (that group won't work in newer sql ver…

…sions)

translator: still minor fixing... sprintf with color codes `% is bad
  • Loading branch information...
NB-Core committed Jul 15, 2019
1 parent e6fb3bf commit e3356272924093d9317c84ea8fffec9f52fd9df8
Showing with 3 additions and 2 deletions.
  1. +2 −1 forest.php
  2. +1 −1 lib/translator.php
@@ -155,7 +155,8 @@
} else $packofmonsters = false; //set for later use
switch($packofmonsters) {
case false:
$multicat=(getsetting('multicategory',0)?"GROUP BY creaturecategory":"");
$multicat = "";
//$multicat=(getsetting('multicategory',0)?"GROUP BY creaturecategory":""); //grouping like that is against newer sql policies, leave it for now
$sql = "SELECT * FROM " . db_prefix("creatures") . " WHERE creaturelevel <= $targetlevel AND creaturelevel >= $mintargetlevel AND forest=1 $multicat ORDER BY rand(".e_rand().") LIMIT $multi";
break;
case true:
@@ -107,7 +107,7 @@ function sprintf_translate(){
if (is_array($args) && count($args)>0) {
//if it is an array
$return = call_user_func_array("sprintf",$args);
} else return $args;
} else $return = $args;
$err = ob_get_contents();
ob_end_clean();
if ($err > ""){

0 comments on commit e335627

Please sign in to comment.
You can’t perform that action at this time.