define ( 'FRIENDICA_CODENAME', 'Asparagus');
define ( 'FRIENDICA_VERSION', '3.5.1-dev' );
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
-define ( 'DB_UPDATE_VERSION', 1208 );
+define ( 'DB_UPDATE_VERSION', 1209 );
/**
* @brief Constant with a HTML line break.
public $videoheight = 350;
public $force_max_items = 0;
public $theme_thread_allow = true;
+ public $theme_richtext_editor = true;
public $theme_events_in_profile = true;
/**
$this->performance["markstart"] = microtime(true);
$this->callstack["database"] = array();
+ $this->callstack["database_write"] = array();
$this->callstack["network"] = array();
$this->callstack["file"] = array();
$this->callstack["rendering"] = array();
/**
* @brief Removes the baseurl from an url. This avoids some mixed content problems.
*
- * @param string $url
+ * @param string $orig_url
*
* @return string The cleaned url
*/
- function remove_baseurl($url){
+ function remove_baseurl($orig_url){
// Is the function called statically?
- if (!is_object($this))
- return(self::$a->remove_baseurl($url));
+ if (!is_object($this)) {
+ return(self::$a->remove_baseurl($orig_url));
+ }
- $url = normalise_link($url);
+ // Remove the hostname from the url if it is an internal link
+ $nurl = normalise_link($orig_url);
$base = normalise_link($this->get_baseurl());
- $url = str_replace($base."/", "", $url);
- return $url;
+ $url = str_replace($base."/", "", $nurl);
+
+ // if it is an external link return the orignal value
+ if ($url == normalise_link($orig_url)) {
+ return $orig_url;
+ } else {
+ return $url;
+ }
}
/**
function proc_run($args) {
+ if (!function_exists("proc_open")) {
+ return;
+ }
+
// Add the php path if it is a php call
- if (count($args) && ($args[0] === 'php' OR is_int($args[0]))) {
+ if (count($args) && ($args[0] === 'php' OR !is_string($args[0]))) {
// If the last worker fork was less than 10 seconds before then don't fork another one.
// This should prevent the forking of masses of workers.