use Exception;
+require_once 'boot.php';
+require_once 'include/dba.php';
+
/**
*
* class: App
use Friendica\Database\DBM;
use dba;
+require_once 'include/dba.php';
+
/**
* @brief This class handles methods related to the forum functionality
*/
use Friendica\Database\DBM;
use dba;
+require_once 'include/dba.php';
+
/**
* @brief Class for storing data for a short time
*/
$memcache_host = Config::get('system', 'memcache_host', '127.0.0.1');
$memcache_port = Config::get('system', 'memcache_port', 11211);
- $memcache = new Memcache;
+ $memcache = new \Memcache;
if (!$memcache->connect($memcache_host, $memcache_port)) {
return false;
use Friendica\Database\DBM;
use dba;
+require_once 'include/dba.php';
+
/**
* @brief Arbitrary sytem configuration storage
*
*/
namespace Friendica\Core;
-use Friendica\Core\Pconfig;
+use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
+require_once 'include/dba.php';
require_once 'include/html2plain.php';
require_once 'include/datetime.php';
require_once 'include/bbcode.php';
use Friendica\Database\DBM;
use dba;
+require_once 'include/dba.php';
+
/**
* @file include/Core/PConfig.php
* @brief contains the class with methods for the management
use dba;
+require_once 'include/dba.php';
+
/**
* @file src/Core/Worker.php
*
use dba;
+require_once 'include/dba.php';
+
/**
* @brief This class contain functions for the database management
*
use dba;
require_once "boot.php";
+require_once 'include/dba.php';
+require_once 'include/enotify.php';
require_once "include/text.php";
/**
private static function createIndex($indexname, $fieldnames, $method = "ADD") {
$method = strtoupper(trim($method));
if ($method!="" && $method!="ADD") {
- throw new Exception("Invalid parameter 'method' in self::createIndex(): '$method'");
+ throw new \Exception("Invalid parameter 'method' in self::createIndex(): '$method'");
}
if ($fieldnames[0] == "UNIQUE") {
use dba;
require_once 'boot.php';
+require_once 'include/dba.php';
require_once 'include/text.php';
/**
use Exception;
require_once 'include/datetime.php';
+require_once 'include/dba.php';
require_once 'include/network.php';
require_once 'include/html2bbcode.php';
use dba;
require_once 'boot.php';
+require_once 'include/dba.php';
require_once 'include/text.php';
/**
use Friendica\Object\Image;
use dba;
+require_once 'include/dba.php';
require_once "include/photos.php";
+
/**
* Class to handle photo dabatase table
*/
require_once 'boot.php';
require_once 'include/crypto.php';
+require_once 'include/dba.php';
require_once 'include/enotify.php';
require_once 'include/network.php';
require_once 'library/openid.php';
$_SESSION['register'] = 1;
$_SESSION['openid'] = $openid_url;
- $openid = new LightOpenID;
+ $openid = new \LightOpenID;
$openid->identity = $openid_url;
$openid->returnUrl = System::baseUrl() . '/openid';
$openid->required = array('namePerson/friendly', 'contact/email', 'namePerson');
define('REQUEST_TOKEN_DURATION', 300);
define('ACCESS_TOKEN_DURATION', 31536000);
+require_once 'include/dba.php';
+
require_once "library/OAuth1.php";
require_once "library/oauth2-php/lib/OAuth2.inc";
$r = dba::inArray($r);
if (DBM::is_result($r)) {
- return new OAuthConsumer($r[0]['client_id'], $r[0]['pw'], $r[0]['redirect_uri']);
+ return new \OAuthConsumer($r[0]['client_id'], $r[0]['pw'], $r[0]['redirect_uri']);
}
return null;
$r = dba::inArray($s);
if (DBM::is_result($r)) {
- $ot=new OAuthToken($r[0]['id'], $r[0]['secret']);
+ $ot = new \OAuthToken($r[0]['id'], $r[0]['secret']);
$ot->scope = $r[0]['scope'];
$ot->expires = $r[0]['expires'];
$ot->uid = $r[0]['uid'];
$r = dba::select('tokens', ['id', 'secret'], ['client_id' => $consumer->key, 'id' => $nonce, 'expires' => $timestamp], ['limit' => 1]);
if (DBM::is_result($r)) {
- return new OAuthToken($r['id'], $r['secret']);
+ return new \OAuthToken($r['id'], $r['secret']);
}
return null;
return null;
}
- return new OAuthToken($key, $sec);
+ return new \OAuthToken($key, $sec);
}
/**
);
if ($r) {
- $ret = new OAuthToken($key, $sec);
+ $ret = new \OAuthToken($key, $sec);
}
}
use Friendica\Util\XML;
use dba;
-use DomXPath;
+use DOMXPath;
use DOMDocument;
+require_once 'include/dba.php';
require_once 'include/network.php';
require_once "include/crypto.php";
use Friendica\Model\Contact;
use dba;
+require_once 'include/dba.php';
require_once 'include/text.php';
require_once 'boot.php';
require_once 'include/conversation.php';
use Friendica\Util\XML;
use dba;
-use DomXPath;
+use DOMXPath;
use DOMDocument;
+require_once 'include/dba.php';
require_once "include/network.php";
require_once "include/oembed.php";
XML::deleteNode($doc, "ol");
XML::deleteNode($doc, "ul");
- $xpath = new DomXPath($doc);
+ $xpath = new DOMXPath($doc);
$list = $xpath->query("//meta[@content]");
foreach ($list as $node) {
*/
namespace Friendica\Protocol;
-use Friendica\App;
use Friendica\Core\Config;
use Friendica\Core\System;
use Friendica\Core\Worker;
use dba;
use DOMDocument;
-use DomXPath;
+use DOMXPath;
+require_once 'boot.php';
+require_once 'include/dba.php';
require_once "include/enotify.php";
require_once "include/threads.php";
require_once "include/items.php";
case 2:
// RINO 2 based on php-encryption
try {
- $key = \Crypto::createNewRandomKey();
+ $key = \Crypto::CreateNewRandomKey();
} catch (\CryptoTestFailedException $ex) {
logger('Cannot safely create a key');
return -4;
return -5;
}
try {
- $data = \Crypto::encrypt($postvars['data'], $key);
+ $data = \Crypto::Encrypt($postvars['data'], $key);
} catch (\CryptoTestFailedException $ex) {
logger('Cannot safely perform encryption');
return -6;
$item['body'] = oembed_html2bbcode($item['body']);
- $config = HTMLPurifier_Config::createDefault();
+ $config = \HTMLPurifier_Config::createDefault();
$config->set('Cache.DefinitionImpl', null);
// we shouldn't need a whitelist, because the bbcode converter
// will strip out any unsupported tags.
- $purifier = new HTMLPurifier($config);
+ $purifier = new \HTMLPurifier($config);
$item['body'] = $purifier->purify($item['body']);
$item['body'] = @html2bbcode($item['body']);
$doc = new DOMDocument();
@$doc->loadXML($xml);
- $xpath = new DomXPath($doc);
+ $xpath = new DOMXPath($doc);
$xpath->registerNamespace("atom", NAMESPACE_ATOM1);
$xpath->registerNamespace("thr", NAMESPACE_THREAD);
$xpath->registerNamespace("at", NAMESPACE_TOMB);
use dba;
use SimpleXMLElement;
+require_once 'include/dba.php';
require_once 'include/items.php';
require_once 'include/bb2diaspora.php';
require_once 'include/datetime.php';
use Friendica\Core\System;
use dba;
use DOMDocument;
-use DomXPath;
+use DOMXPath;
-require_once("include/html2bbcode.php");
-require_once("include/items.php");
+require_once 'include/dba.php';
+require_once 'include/html2bbcode.php';
+require_once 'include/items.php';
/**
* @brief This class contain functions to import feeds
$doc = new DOMDocument();
@$doc->loadXML(trim($xml));
- $xpath = new DomXPath($doc);
+ $xpath = new DOMXPath($doc);
$xpath->registerNamespace('atom', NAMESPACE_ATOM1);
$xpath->registerNamespace('dc', "http://purl.org/dc/elements/1.1/");
$xpath->registerNamespace('content', "http://purl.org/rss/1.0/modules/content/");
use Friendica\Util\XML;
use dba;
use DOMDocument;
-use DomXPath;
+use DOMXPath;
+require_once 'include/dba.php';
require_once 'include/threads.php';
require_once 'include/html2bbcode.php';
require_once 'include/bbcode.php';
$doc = new DOMDocument();
@$doc->loadXML($xml);
- $xpath = new DomXPath($doc);
+ $xpath = new DOMXPath($doc);
$xpath->registerNamespace('atom', NAMESPACE_ATOM1);
$xpath->registerNamespace('thr', NAMESPACE_THREAD);
$xpath->registerNamespace('georss', NAMESPACE_GEORSS);
$doc = new DOMDocument();
@$doc->loadXML($xml);
- $xpath = new DomXPath($doc);
+ $xpath = new DOMXPath($doc);
$xpath->registerNamespace('atom', NAMESPACE_ATOM1);
$xpath->registerNamespace('thr', NAMESPACE_THREAD);
$xpath->registerNamespace('georss', NAMESPACE_GEORSS);
if (!@$doc->loadHTML($conversation_data['body'])) {
return;
}
- $xpath = new DomXPath($doc);
+ $xpath = new DOMXPath($doc);
$links = $xpath->query('//link');
if ($links) {
$doc = new DOMDocument();
@$doc->loadXML($xml);
- $xpath = new DomXPath($doc);
+ $xpath = new DOMXPath($doc);
$xpath->registerNamespace('atom', NAMESPACE_ATOM1);
$xpath->registerNamespace('thr', NAMESPACE_THREAD);
$xpath->registerNamespace('ostatus', NAMESPACE_OSTATUS);
if (!@$doc->loadHTML($related_data['body'])) {
return;
}
- $xpath = new DomXPath($doc);
+ $xpath = new DOMXPath($doc);
$atom_file = '';
use Friendica\Network\Probe;
use dba;
use DOMDocument;
-use DomXPath;
+use DOMXPath;
use Exception;
+require_once 'include/dba.php';
require_once 'include/datetime.php';
require_once 'include/network.php';
require_once 'include/html2bbcode.php';
$doc = new DOMDocument();
@$doc->loadXML($feedret["body"]);
- $xpath = new DomXPath($doc);
+ $xpath = new DOMXPath($doc);
$xpath->registerNamespace('atom', "http://www.w3.org/2005/Atom");
$entries = $xpath->query('/atom:feed/atom:entry');
$doc = new DOMDocument();
@$doc->loadHTML($body);
- $xpath = new DomXPath($doc);
+ $xpath = new DOMXPath($doc);
$list = $xpath->query("//meta[@name]");
use Friendica\Model\User;
use dba;
+require_once 'include/dba.php';
require_once 'include/dba.php';
class ExAuth
}
$file = $lockpath . DIRECTORY_SEPARATOR . $host;
- if (Pidfile::isRunningProcess($file)) {
+ if (PidFile::isRunningProcess($file)) {
if (PidFile::killProcess($file)) {
$this->writeLog(LOG_INFO, 'Old process was successfully killed');
} else {
}
// Now it is safe to create the pid file
- Pidfile::create($file);
+ PidFile::create($file);
}
/**
use Memcache;
use dba;
+require_once 'include/dba.php';
+
/**
* @brief This class contain Functions for preventing parallel execution of functions
*/
/**
* @brief Pidfile class
*/
-class Pidfile
+class PidFile
{
/**
* @brief Read the pid from a given pid file
*/
namespace Friendica\Util;
-use DomXPath;
+use DOMXPath;
use SimpleXMLElement;
/**
*/
public static function deleteNode(&$doc, $node)
{
- $xpath = new DomXPath($doc);
+ $xpath = new DOMXPath($doc);
$list = $xpath->query("//".$node);
foreach ($list as $child) {
$child->parentNode->removeChild($child);
use Friendica\Database\DBM;
use dba;
+require_once 'include/dba.php';
+
Class Cron {
public static function execute($parameter = '', $generation = 0) {
global $a;
use Friendica\Protocol\PortableContact;
use dba;
+require_once 'include/dba.php';
+require_once 'include/post_update.php';
+require_once 'mod/nodeinfo.php';
+
class CronJobs
{
public static function execute($command = '')
use Friendica\Core\Worker;
use dba;
+require_once 'include/dba.php';
+
class DBClean {
public static function execute($stage = 0) {
use Friendica\Database\DBM;
use dba;
+require_once 'include/dba.php';
+
class Expire {
public static function execute($param = '', $hook_name = '') {
global $a;
use Friendica\Protocol\Salmon;
use dba;
+require_once 'include/dba.php';
require_once 'include/queue_fn.php';
require_once 'include/html2plain.php';
require_once 'include/datetime.php';
use Friendica\Protocol\PortableContact;
use dba;
+require_once 'include/dba.php';
require_once 'include/follow.php';
Class OnePoll
use Friendica\Protocol\Salmon;
use dba;
+require_once 'include/dba.php';
require_once 'include/queue_fn.php';
require_once 'include/datetime.php';
require_once 'include/items.php';
use Friendica\Core\Config;
use dba;
+require_once 'include/dba.php';
+
class RemoveContact {
public static function execute($id) {