Merge pull request #4443 from rabuzarus/20180212_-_fix_variables_part_three
fix undeclared variables or wrong variable names (/src) part 3
This commit is contained in:
commit
170e84e9f2
|
@ -471,3 +471,5 @@ mod/cb.php: Addon::callHooks('cb_afterpost');
|
||||||
mod/cb.php: Addon::callHooks('cb_content', $o);
|
mod/cb.php: Addon::callHooks('cb_content', $o);
|
||||||
|
|
||||||
mod/directory.php: Addon::callHooks('directory_item', $arr);
|
mod/directory.php: Addon::callHooks('directory_item', $arr);
|
||||||
|
|
||||||
|
src/Model/Item.php Addon::callHooks('tagged', $arr);
|
||||||
|
|
|
@ -1115,7 +1115,7 @@ class BBCode
|
||||||
$text = $preshare . html_entity_decode("♲ ", ENT_QUOTES, 'UTF-8') . ' ' . $userid_compact . ": <br />" . $share[3];
|
$text = $preshare . html_entity_decode("♲ ", ENT_QUOTES, 'UTF-8') . ' ' . $userid_compact . ": <br />" . $share[3];
|
||||||
break;
|
break;
|
||||||
case 3: // Diaspora
|
case 3: // Diaspora
|
||||||
$headline .= '<b>' . html_entity_decode("♲ ", ENT_QUOTES, 'UTF-8') . $userid . ':</b><br />';
|
$headline = '<b>' . html_entity_decode("♲ ", ENT_QUOTES, 'UTF-8') . $userid . ':</b><br />';
|
||||||
|
|
||||||
$text = trim($share[1]);
|
$text = trim($share[1]);
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ class Widget
|
||||||
if ($x || is_site_admin()) {
|
if ($x || is_site_admin()) {
|
||||||
$a->page['aside'] .= '<div class="side-link" id="side-invite-remain">'
|
$a->page['aside'] .= '<div class="side-link" id="side-invite-remain">'
|
||||||
. L10n::tt('%d invitation available', '%d invitations available', $x)
|
. L10n::tt('%d invitation available', '%d invitations available', $x)
|
||||||
. '</div>' . $inv;
|
. '</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ class Conversation
|
||||||
unset($conversation['source']);
|
unset($conversation['source']);
|
||||||
}
|
}
|
||||||
if (!dba::update('conversation', $conversation, ['item-uri' => $conversation['item-uri']], $old_conv)) {
|
if (!dba::update('conversation', $conversation, ['item-uri' => $conversation['item-uri']], $old_conv)) {
|
||||||
logger('Conversation: update for '.$conversation['item-uri'].' from '.$conv['protocol'].' to '.$conversation['protocol'].' failed', LOGGER_DEBUG);
|
logger('Conversation: update for '.$conversation['item-uri'].' from '.$old_conv['protocol'].' to '.$conversation['protocol'].' failed', LOGGER_DEBUG);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!dba::insert('conversation', $conversation, true)) {
|
if (!dba::insert('conversation', $conversation, true)) {
|
||||||
|
|
|
@ -263,7 +263,7 @@ class Item extends BaseObject
|
||||||
}
|
}
|
||||||
|
|
||||||
$arr['guid'] = notags(trim(defaults($arr, 'guid', get_guid(32, $guid_prefix))));
|
$arr['guid'] = notags(trim(defaults($arr, 'guid', get_guid(32, $guid_prefix))));
|
||||||
$arr['uri'] = notags(trim(defaults($arr, 'uri', item_new_uri($a->get_hostname(), $uid, $arr['guid']))));
|
$arr['uri'] = notags(trim(defaults($arr, 'uri', item_new_uri($a->get_hostname(), $arr['uid'], $arr['guid']))));
|
||||||
|
|
||||||
// Store conversation data
|
// Store conversation data
|
||||||
$arr = Conversation::insert($arr);
|
$arr = Conversation::insert($arr);
|
||||||
|
@ -1294,7 +1294,7 @@ class Item extends BaseObject
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$arr = ['item' => $item, 'user' => $u[0], 'contact' => $r[0]];
|
$arr = ['item' => $item, 'user' => $u[0]];
|
||||||
|
|
||||||
Addon::callHooks('tagged', $arr);
|
Addon::callHooks('tagged', $arr);
|
||||||
|
|
||||||
|
|
|
@ -625,6 +625,7 @@ class Profile
|
||||||
require_once 'include/bbcode.php';
|
require_once 'include/bbcode.php';
|
||||||
|
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
|
$o = '';
|
||||||
|
|
||||||
if (!local_user() || $a->is_mobile || $a->is_tablet) {
|
if (!local_user() || $a->is_mobile || $a->is_tablet) {
|
||||||
return $o;
|
return $o;
|
||||||
|
|
|
@ -90,12 +90,12 @@ class DateTimeFormat
|
||||||
{
|
{
|
||||||
// Defaults to UTC if nothing is set, but throws an exception if set to empty string.
|
// Defaults to UTC if nothing is set, but throws an exception if set to empty string.
|
||||||
// Provide some sane defaults regardless.
|
// Provide some sane defaults regardless.
|
||||||
if ($from === '') {
|
if ($tz_from === '') {
|
||||||
$from = 'UTC';
|
$tz_from = 'UTC';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($to === '') {
|
if ($tz_to === '') {
|
||||||
$to = 'UTC';
|
$tz_to = 'UTC';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($s === '') || (!is_string($s))) {
|
if (($s === '') || (!is_string($s))) {
|
||||||
|
|
|
@ -370,6 +370,9 @@ class Network
|
||||||
|
|
||||||
if ($http_code == 301 || $http_code == 302 || $http_code == 303 || $http_code == 307) {
|
if ($http_code == 301 || $http_code == 302 || $http_code == 303 || $http_code == 307) {
|
||||||
$matches = [];
|
$matches = [];
|
||||||
|
$new_location_info = @parse_url($curl_info['redirect_url']);
|
||||||
|
$old_location_info = @parse_url($curl_info['url']);
|
||||||
|
|
||||||
preg_match('/(Location:|URI:)(.*?)\n/', $header, $matches);
|
preg_match('/(Location:|URI:)(.*?)\n/', $header, $matches);
|
||||||
$newurl = trim(array_pop($matches));
|
$newurl = trim(array_pop($matches));
|
||||||
|
|
||||||
|
|
|
@ -127,6 +127,8 @@ class Temporal
|
||||||
*/
|
*/
|
||||||
public static function getDateofBirthField($dob)
|
public static function getDateofBirthField($dob)
|
||||||
{
|
{
|
||||||
|
$a = get_app();
|
||||||
|
|
||||||
list($year, $month, $day) = sscanf($dob, '%4d-%2d-%2d');
|
list($year, $month, $day) = sscanf($dob, '%4d-%2d-%2d');
|
||||||
|
|
||||||
if ($dob < '0000-01-01') {
|
if ($dob < '0000-01-01') {
|
||||||
|
|
Loading…
Reference in a new issue