function addUniqID($userid) { Sql_query(sprintf('update %s set uniqid = "%s" where id = %d', $GLOBALS['tables']['user'], getUniqID(), $userid)); }
} else { $reload = 0; } ## this one sends a notification to plugins that processing has started foreach ($GLOBALS['plugins'] as $pluginname => $plugin) { $plugin->processQueueStart(); } ## let's make sure all subscribers have a uniqid ## only when on CL if ($GLOBALS['commandline']) { $req = Sql_Query(sprintf('select id from %s where uniqid is NULL or uniqid = ""', $GLOBALS['tables']['user'])); $num = Sql_Affected_Rows(); if ($num) { cl_output(s('Giving a Unique ID to %d subscribers, this may take a while', $num)); while ($row = Sql_Fetch_Row($req)) { Sql_query(sprintf('update %s set uniqid = "%s" where id = %d', $GLOBALS['tables']['user'], getUniqID(), $row[0])); } } } $counters['num_per_batch'] = 0; $batch_period = 0; $script_stage = 0; # start $someusers = $skipped = 0; $maxbatch = -1; $minbatchperiod = -1; # check for batch limits $ISPrestrictions = ''; $ISPlockfile = ''; //$rssitems = array(); //Obsolete by rssmanager plugin $user_attribute_query = '';
} else { $reload = 0; } ## this one sends a notification to plugins that processing has started foreach ($GLOBALS['plugins'] as $pluginname => $plugin) { $plugin->processQueueStart(); } ## let's make sure all subscribers have a uniqid ## only when on CL if ($GLOBALS['commandline']) { $req = Sql_Query(sprintf('select id from %s where uniqid is NULL or uniqid = ""', $GLOBALS["tables"]["user"])); $num = Sql_Affected_Rows(); if ($num) { cl_output('Giving a Unique ID to ' . $num . ' subscribers, this may take a while'); while ($row = Sql_Fetch_Row($req)) { Sql_query(sprintf('update %s set uniqid = "%s" where id = %d', $GLOBALS["tables"]["user"], getUniqID(), $row[0])); } } } $num_per_batch = 0; $batch_period = 0; $script_stage = 0; # start $someusers = $skipped = 0; $maxbatch = -1; $minbatchperiod = -1; # check for batch limits $ISPrestrictions = ''; $ISPlockfile = ''; //$rssitems = array(); //Obsolete by rssmanager plugin $user_attribute_query = '';