mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 23:55:19 +00:00
warnings
This commit is contained in:
parent
7631722d16
commit
654000ed28
6 changed files with 23 additions and 17 deletions
|
@ -801,13 +801,14 @@ class Libzot
|
|||
$deleted_changed = 1;
|
||||
}
|
||||
|
||||
if ($arr['channel_type'] === 'collection') {
|
||||
$px = 2;
|
||||
} elseif ($arr['channel_type'] === 'group') {
|
||||
$px = 1;
|
||||
} else {
|
||||
$px = 0;
|
||||
}
|
||||
$px = 0;
|
||||
if (isset($arr['channel_type'])) {
|
||||
if ($arr['channel_type'] === 'collection') {
|
||||
$px = 2;
|
||||
} elseif ($arr['channel_type'] === 'group') {
|
||||
$px = 1;
|
||||
}
|
||||
}
|
||||
if (array_key_exists('public_forum', $arr) && intval($arr['public_forum'])) {
|
||||
$px = 1;
|
||||
}
|
||||
|
@ -3587,7 +3588,7 @@ class Libzot
|
|||
public static function is_zot_request()
|
||||
{
|
||||
|
||||
$x = getBestSupportedMimeType(['application/x-zot+json', 'application/x-nomad']);
|
||||
$x = getBestSupportedMimeType(['application/x-zot+json', 'application/x-nomad+json']);
|
||||
return (($x) ? true : false);
|
||||
}
|
||||
|
||||
|
|
|
@ -297,7 +297,11 @@ class Libzotdir
|
|||
$arr = [];
|
||||
|
||||
$arr['xprof_hash'] = $hash;
|
||||
$arr['xprof_dob'] = ((isset($profile['birthday']) && $profile['birthday'] === '0000-00-00') ? $profile['birthday'] : datetime_convert('', '', $profile['birthday'], 'Y-m-d')); // !!!! check this for 0000 year
|
||||
if (isset($profile['birthday'])) {
|
||||
$arr['xprof_dob'] = (($profile['birthday'] === '0000-00-00')
|
||||
? $profile['birthday']
|
||||
: datetime_convert('', '', $profile['birthday'], 'Y-m-d')); // !!!! check this for 0000 year
|
||||
}
|
||||
$arr['xprof_age'] = (isset($profile['age']) ? intval($profile['age']) : 0);
|
||||
$arr['xprof_desc'] = ((isset($profile['description']) && $profile['description']) ? htmlspecialchars($profile['description'], ENT_COMPAT, 'UTF-8', false) : '');
|
||||
$arr['xprof_gender'] = ((isset($profile['gender']) && $profile['gender']) ? htmlspecialchars($profile['gender'], ENT_COMPAT, 'UTF-8', false) : '');
|
||||
|
|
11
boot.php
11
boot.php
|
@ -891,11 +891,11 @@ class App {
|
|||
|
||||
// normally self::$hostname (also scheme and port) will be filled in during startup.
|
||||
// Set it manually from $_SERVER variables only if it wasn't.
|
||||
|
||||
|
||||
if (! self::$hostname) {
|
||||
self::$hostname = punify(get_host());
|
||||
self::$scheme = 'http';
|
||||
|
||||
|
||||
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']) {
|
||||
self::$scheme = 'https';
|
||||
}
|
||||
|
@ -920,7 +920,7 @@ class App {
|
|||
// Rewrite rules on the server will convert incoming paths to a request parameter.
|
||||
// Strip this path information from our stored copy of the query_string, in case
|
||||
// we need to re-use the rest of the original query.
|
||||
|
||||
|
||||
if (isset($_SERVER['QUERY_STRING']) && substr($_SERVER['QUERY_STRING'], 0, 4) === "req=") {
|
||||
self::$query_string = str_replace(['<','>'],['<','>'],substr($_SERVER['QUERY_STRING'], 4));
|
||||
// removing leading '/' - maybe a nginx problem
|
||||
|
@ -934,7 +934,7 @@ class App {
|
|||
// Here is where start breaking out the URL path information to both route the
|
||||
// web request based on the leading path component, and also to use remaining
|
||||
// path components as C-style arguments to our individual controller modules.
|
||||
|
||||
|
||||
if (isset($_GET['req'])) {
|
||||
self::$cmd = escape_tags(trim($_GET['req'],'/\\'));
|
||||
}
|
||||
|
@ -1416,8 +1416,9 @@ function z_root() {
|
|||
* @return string
|
||||
*/
|
||||
function absurl($path) {
|
||||
if (strpos($path, '/') === 0)
|
||||
if (strpos($path, '/') === 0) {
|
||||
return z_path() . $path;
|
||||
}
|
||||
|
||||
return $path;
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ Let's go ahead and add some code to implement our post_local hook handler.
|
|||
$cities = [];
|
||||
$zones = timezone_identifiers_list();
|
||||
foreach ($zones as $zone) {
|
||||
if ((strpos($zone,'/')) && (! stristr($zone,'US/')) && (! stristr($zone,'Etc/'))) {
|
||||
if ((strpos($zone,'/')) && (stristr($zone,'US/') === false) && (stristr($zone,'Etc/') === false)) {
|
||||
$cities[] = str_replace('_', ' ',substr($zone,strrpos($zone,'/') + 1));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2996,7 +2996,7 @@ function handle_tag(&$body, &$str_tags, $profile_uid, $tag, $in_network = true)
|
|||
}
|
||||
|
||||
// is the link already in str_tags?
|
||||
if (! stristr($str_tags, $newtag)) {
|
||||
if (is_string($newtag) && ! stristr($str_tags, $newtag)) {
|
||||
// append or set str_tags
|
||||
if (strlen($str_tags)) {
|
||||
$str_tags .= ',';
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
<?php
|
||||
define ( 'STD_VERSION', '21.12.04' );
|
||||
define ( 'STD_VERSION', '21.12.15' );
|
||||
|
|
Loading…
Reference in a new issue