equal
deleted
inserted
replaced
378 { |
378 { |
379 $i++; |
379 $i++; |
380 $current_is_ip = is_valid_ip($ip); |
380 $current_is_ip = is_valid_ip($ip); |
381 if ( $current_is_ip && $prev_is_ip ) |
381 if ( $current_is_ip && $prev_is_ip ) |
382 { |
382 { |
|
383 $i++; |
383 $new['u'][] = $prev; |
384 $new['u'][] = $prev; |
384 } |
385 } |
385 if ( $current_is_ip ) |
386 if ( $current_is_ip ) |
386 { |
387 { |
387 $new['ip'][] = $ip; |
388 $new['ip'][] = $ip; |
390 { |
391 { |
391 $new['u'][] = $ip; |
392 $new['u'][] = $ip; |
392 } |
393 } |
393 $prev = $ip; |
394 $prev = $ip; |
394 $prev_is_ip = $current_is_ip; |
395 $prev_is_ip = $current_is_ip; |
|
396 } |
|
397 if ( $i % 2 == 1 && $prev_is_ip ) |
|
398 { |
|
399 $new['u'][] = $ip; |
395 } |
400 } |
396 $new = serialize($new); |
401 $new = serialize($new); |
397 $e = $db->sql_query('UPDATE '.table_prefix.'pages SET delvote_ips=\'' . $db->escape($new) . '\' WHERE urlname=\'' . $db->escape($row['urlname']) . '\' AND namespace=\'' . $db->escape($row['namespace']) . '\';'); |
402 $e = $db->sql_query('UPDATE '.table_prefix.'pages SET delvote_ips=\'' . $db->escape($new) . '\' WHERE urlname=\'' . $db->escape($row['urlname']) . '\' AND namespace=\'' . $db->escape($row['namespace']) . '\';'); |
398 if ( !$e ) |
403 if ( !$e ) |
399 $db->_die(); |
404 $db->_die(); |