File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<?php
2- include 'include/functions.inc.php ' ;
2+ include __DIR__ .'/../../../../include/functions.inc.php ' ;
3+ include_once __DIR__ .'/../src/ImapAbuseCheck.php ' ;
34$ db = get_module_db ('default ' );
45$ db2 = get_module_db ('default ' );
56$ limit = 10000 ;
89while ($ continue == true ) {
910 $ start = time ();
1011 echo "Grabbing Rows $ offset - " .($ offset +$ limit );
11- $ db ->query ("select * from abuse left join abuse_data using (abuse_id) where abuse_id >= 440000 and abuse_headers != '' limit $ offset, $ limit; " );
12+ $ db ->query ("select * from abuse left join abuse_data using (abuse_id) where abuse_headers != '' limit $ offset, $ limit; " );
1213 echo " got " .$ db ->num_rows ()." rows " ;
1314 if ($ db ->num_rows () < $ limit ) {
1415 $ continue = false ;
1516 }
1617 $ offset += $ limit ;
1718 while ($ db ->next_record (MYSQL_ASSOC )) {
18- $ out = fix_headers ($ db ->Record ['abuse_headers ' ]);
19+ $ out = ImapAbuseCheck:: fix_headers ($ db ->Record ['abuse_headers ' ]);
1920 if ($ out != $ db ->Record ['abuse_headers ' ]) {
2021 $ db2 ->query ("update abuse_data set abuse_headers=' " .$ db ->real_escape ($ out )."' where abuse_id= {$ db ->Record ['abuse_id ' ]}" );
2122 //echo ".";
Original file line number Diff line number Diff line change @@ -533,7 +533,7 @@ public static function fix_headers($headers)
533533 }
534534 }
535535 }
536- $ out = preg_replace ("/ \n\s* \n/m " , "\n" , strip_tags ($ out ));
536+ $ out = rtrim ( preg_replace ("/ \n\s* \n/m " , "\n" , strip_tags ($ out) ));
537537 return $ out ;
538538 }
539539}
You can’t perform that action at this time.
0 commit comments