* Not all of those $_SERVER properties can be present, so we do by inverse priority order
*/
$relative_script_path =
- ($this->server['REDIRECT_URL'] ?? '' ) ?:
- ($this->server['REDIRECT_URI'] ?? '' ) ?:
- ($this->server['REDIRECT_SCRIPT_URL'] ?? '' ) ?:
- ($this->server['SCRIPT_URL'] ?? '' ) ?:
+ ($this->server['REDIRECT_URL'] ?? '') ?:
+ ($this->server['REDIRECT_URI'] ?? '') ?:
+ ($this->server['REDIRECT_SCRIPT_URL'] ?? '') ?:
+ ($this->server['SCRIPT_URL'] ?? '') ?:
$this->server['REQUEST_URI'] ?? '';
/* $relative_script_path gives /relative/path/to/friendica/module/parameter
throw new InternalServerErrorException('DICE isn\'t initialized.');
}
- if (class_exists($name) || interface_exists($name )) {
+ if (class_exists($name) || interface_exists($name)) {
return self::$dice->create($name);
} else {
throw new InternalServerErrorException('Class \'' . $name . '\' isn\'t valid.');
/**
* This class is responsible for all system-wide configuration values in Friendica
* There are two types of storage
- * - The Config-Files (loaded into the FileCache @see Cache\ConfigCache )
- * - The Config-DB-Table (per Config-DB-model @see Model\Config\Config )
+ * - The Config-Files (loaded into the FileCache @see Cache\ConfigCache)
+ * - The Config-DB-Table (per Config-DB-model @see Model\Config\Config)
*/
abstract class Configuration
{
*
* Get a particular config value from the given category ($cat)
* and the $key from a cached storage either from the $this->configAdapter
- * (@see IConfigAdapter ) or from the $this->configCache (@see ConfigCache ).
+ * (@see IConfigAdapter) or from the $this->configCache (@see ConfigCache).
*
* @param string $cat The category of the configuration value
* @param string $key The configuration key to query
* @brief Deletes the given key from the system configuration.
*
* Removes the configured value from the stored cache in $this->configCache
- * (@see ConfigCache ) and removes it from the database (@see IConfigAdapter ).
+ * (@see ConfigCache) and removes it from the database (@see IConfigAdapter).
*
* @param string $cat The category of the configuration value
* @param string $key The configuration key to delete
* This class is responsible for the user-specific configuration values in Friendica
* The values are set through the Config-DB-Table (per Config-DB-model @see Model\Config\PConfig)
*
- * The configuration cache (@see Cache\PConfigCache ) is used for temporary caching of database calls. This will
+ * The configuration cache (@see Cache\PConfigCache) is used for temporary caching of database calls. This will
* increase the performance.
*/
abstract class PConfiguration
* @param string $cat The category of the configuration value
*
* @return void
- * @see PConfigCache )
+ * @see PConfigCache
*
*/
abstract public function load(int $uid, string $cat = 'config');
*
* Get a particular user's config value from the given category ($cat)
* and the $key with the $uid from a cached storage either from the $this->configAdapter
- * (@see IConfigAdapter ) or from the $this->configCache (@see PConfigCache ).
+ * (@see IConfigAdapter) or from the $this->configCache (@see PConfigCache).
*
* @param int $uid The user_id
* @param string $cat The category of the configuration value
* Deletes the given key from the users's configuration.
*
* Removes the configured value from the stored cache in $this->configCache
- * (@see ConfigCache ) and removes it from the database (@see IConfigAdapter )
+ * (@see ConfigCache) and removes it from the database (@see IConfigAdapter)
* with the given $uid.
*
* @param int $uid The user_id
* @todo You cannot rename a primary key if "auto increment" is set
*
* @param string $table Table name
- * @param array $columns Columns Syntax for Rename: [ $old1 => [ $new1, $type1 ], $old2 => [ $new2, $type2 ], ... ] )
- * Syntax for Primary Key: [ $col1, $col2, ...] )
+ * @param array $columns Columns Syntax for Rename: [ $old1 => [ $new1, $type1 ], $old2 => [ $new2, $type2 ], ... ]
+ * Syntax for Primary Key: [ $col1, $col2, ...]
* @param int $type The type of renaming (Default is Column)
*
* @return boolean Was the renaming successful?
WHERE `glink`.`cid` = %d AND `glink`.`uid` = %d AND
((`gcontact`.`last_contact` >= `gcontact`.`last_failure`) OR
(`gcontact`.`updated` >= `gcontact`.`last_failure`))
- AND `gcontact`.`nurl` IN (select nurl from contact where uid = %d and self = 0 and blocked = 0 and hidden = 0 and id != %d ) ",
+ AND `gcontact`.`nurl` IN (select nurl from contact where uid = %d and self = 0 and blocked = 0 and hidden = 0 and id != %d) ",
intval($cid),
intval($uid),
intval($uid),
"SELECT count(*) as `total`
FROM `glink` INNER JOIN `gcontact` on `glink`.`gcid` = `gcontact`.`id`
where `glink`.`zcid` = %d
- and `gcontact`.`nurl` in (select nurl from contact where uid = %d and self = 0 and blocked = 0 and hidden = 0 ) ",
+ and `gcontact`.`nurl` in (select nurl from contact where uid = %d and self = 0 and blocked = 0 and hidden = 0) ",
intval($zcid),
intval($uid)
);
"SELECT `gcontact`.*
FROM `glink` INNER JOIN `gcontact` on `glink`.`gcid` = `gcontact`.`id`
where `glink`.`zcid` = %d
- and `gcontact`.`nurl` in (select nurl from contact where uid = %d and self = 0 and blocked = 0 and hidden = 0 )
+ and `gcontact`.`nurl` in (select nurl from contact where uid = %d and self = 0 and blocked = 0 and hidden = 0)
$sql_extra limit %d, %d",
intval($zcid),
intval($uid),
$diaspora = [
'guid' => $profile['guid'],
'podloc' => System::baseUrl(),
- 'searchable' => (($profile['publish'] && $profile['net-publish']) ? 'true' : 'false' ),
+ 'searchable' => (($profile['publish'] && $profile['net-publish']) ? 'true' : 'false'),
'nickname' => $profile['nickname'],
'fullname' => $profile['name'],
'firstname' => $firstname,
// Extract one prepended mention at a time from the body
while(preg_match('#^(@\[url=([^\]]+)].*?\[\/url]\s)(.*)#is', $body, $matches)) {
- if (!in_array($matches[2], $potential_mentions) ) {
+ if (!in_array($matches[2], $potential_mentions)) {
$kept_mentions[] = $matches[1];
}
}
/**
- * Maps the LogLevel (@see LogLevel ) to a SysLog priority (@see http://php.net/manual/en/function.syslog.php#refsect1-function.syslog-parameters )
+ * Maps the LogLevel (@see LogLevel) to a SysLog priority (@see http://php.net/manual/en/function.syslog.php#refsect1-function.syslog-parameters)
*
* @param string $level A LogLevel
*
/// @TODO Really suppress function outcomes? Why not find them + debug them?
$h = @parse_url($url);
- if (!empty($h['host']) && (@dns_get_record($h['host'], DNS_A + DNS_CNAME) || filter_var($h['host'], FILTER_VALIDATE_IP) )) {
+ if (!empty($h['host']) && (@dns_get_record($h['host'], DNS_A + DNS_CNAME) || filter_var($h['host'], FILTER_VALIDATE_IP))) {
return $url;
}
$h = substr($addr, strpos($addr, '@') + 1);
// Concerning the @ see here: https://stackoverflow.com/questions/36280957/dns-get-record-a-temporary-server-error-occurred
- if ($h && (@dns_get_record($h, DNS_A + DNS_MX) || filter_var($h, FILTER_VALIDATE_IP) )) {
+ if ($h && (@dns_get_record($h, DNS_A + DNS_MX) || filter_var($h, FILTER_VALIDATE_IP))) {
return true;
}
if ($h && @dns_get_record($h, DNS_CNAME + DNS_MX)) {
* A class to store profiling data
* It can handle different logging data for specific functions or global performance measures
*
- * It stores the data as log entries (@see LoggerInterface )
+ * It stores the data as log entries (@see LoggerInterface)
*/
class Profiler implements ContainerInterface
{