forked from Cavemanon/cavepaintings
Changing for-loops to use pre-calculated values.
Rather than calculating the value each time.
This commit is contained in:
@ -107,7 +107,8 @@ class Ratings implements Extension {
|
||||
if(preg_match("/^rating=([sqeu]+)$/", $event->term, $matches)) {
|
||||
$sqes = $matches[1];
|
||||
$arr = array();
|
||||
for($i=0; $i<strlen($sqes); $i++) {
|
||||
$length = strlen($sqes);
|
||||
for($i=0; $i<$length; $i++) {
|
||||
$arr[] = "'" . $sqes[$i] . "'";
|
||||
}
|
||||
$set = join(', ', $arr);
|
||||
@ -150,7 +151,8 @@ class Ratings implements Extension {
|
||||
|
||||
public static function privs_to_sql($sqes) {
|
||||
$arr = array();
|
||||
for($i=0; $i<strlen($sqes); $i++) {
|
||||
$length = strlen($sqes);
|
||||
for($i=0; $i<$length; $i++) {
|
||||
$arr[] = "'" . $sqes[$i] . "'";
|
||||
}
|
||||
$set = join(', ', $arr);
|
||||
|
Reference in New Issue
Block a user