use Friendica\Core\PConfig;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
+use Friendica\Object\Contact;
use Friendica\Util\Lock;
require_once 'include/network.php';
require_once 'include/identity.php';
require_once 'update.php';
require_once 'include/dbstructure.php';
-require_once 'include/poller.php';
define('FRIENDICA_PLATFORM', 'Friendica');
define('FRIENDICA_CODENAME', 'Asparagus');
/**
* @brief Function to check if request was an AJAX (xmlhttprequest) request.
*
- * @param boolean $via_worker boolean Is the check run via the poller?
+ * @param boolean $via_worker boolean Is the check run via the worker?
*/
function check_db($via_worker)
{
if (!$public_contact_id && x($_SESSION, 'authenticated')) {
if (x($_SESSION, 'my_address')) {
// Local user
- $public_contact_id = intval(get_contact($_SESSION['my_address'], 0));
+ $public_contact_id = intval(Contact::getIdForURL($_SESSION['my_address'], 0));
} elseif (x($_SESSION, 'visitor_home')) {
// Remote user
- $public_contact_id = intval(get_contact($_SESSION['visitor_home'], 0));
+ $public_contact_id = intval(Contact::getIdForURL($_SESSION['visitor_home'], 0));
}
} elseif (!x($_SESSION, 'authenticated')) {
$public_contact_id = false;
return ((x($a->config, 'max_import_size')) ? $a->config['max_import_size'] : 0 );
}
-/**
- * @brief compatibilty wrapper for Worker::add function
- *
- * @param (integer|array) priority or parameter array, strings are deprecated and are ignored
- *
- * @return boolean "false" if proc_run couldn't be executed
- */
-function proc_run()
-{
- $proc_args = func_get_args();
- call_user_func_array('Friendica\Core\Worker::add', $proc_args);
-}
function current_theme()
{