The method _private_nodes_update_privacy_table() calls search_wipe(null,null,true), which removes the entries node_cron_last and node_cron_last_nid from the variables database table. This effectively resets the indexing back to 0%.
This occurs every time an existing public node is edited and saved.
I assume the intended behavior is to index the edited node only, especially if the visibility was changed from private to public.
I replaced the call to search_wipe(null,null,true) with search_wipe($nid, 'node', true) to prevent the index reset.
Comments
Comment #1
calebgilbert commentedThis was a great recommendation, not only for the reasons you outline above, but it also solved an issue which was causing a php exception:
Unexpected PHP error [mysql_real_escape_string() expects parameter 1 to be string, array given] severity [E_WARNING] in [/Library/WebServer/Documents/site/trunk/htdocs/includes/database.mysql.inc line 463](note: I followed the backtrace from the error all the way to search_wipe which passed the 'parameter 1' being complained about in the error)