From e5c66d94f22d0efcdec0796872e9be81bff1bb4e Mon Sep 17 00:00:00 2001 From: redmatrix Date: Thu, 23 Jun 2016 05:18:58 -0700 Subject: relocate the cache class --- include/cache.php | 44 -------------------------------------------- include/oembed.php | 6 ++++-- include/text.php | 28 ++-------------------------- 3 files changed, 6 insertions(+), 72 deletions(-) delete mode 100644 include/cache.php (limited to 'include') diff --git a/include/cache.php b/include/cache.php deleted file mode 100644 index 4a3f453e1..000000000 --- a/include/cache.php +++ /dev/null @@ -1,44 +0,0 @@ -= 5.4 - * - * @FIXME We already have php >= 5.4 requirements, so can we remove this? - */ -if(! function_exists('hex2bin')) { -function hex2bin($s) { - if(! (is_string($s) && strlen($s))) - return ''; - - if(strlen($s) & 1) { - logger('hex2bin: illegal hex string: ' . $s); - return $s; - } - - if(! ctype_xdigit($s)) { - return($s); - } - - return(pack("H*",$s)); -}} - - // Automatic pagination. // To use, get the count of total items. // Then call App::set_pager_total($number_items); @@ -1283,7 +1259,7 @@ function normalise_link($url) { * is https and the other isn't, or if one is www.something and the other * isn't - and also ignore case differences. * - * @see normalis_link() + * @see normalise_link() * * @param string $a * @param string $b @@ -1635,7 +1611,7 @@ function prepare_text($text, $content_type = 'text/bbcode', $cache = false) { function create_export_photo_body(&$item) { if(($item['verb'] === ACTIVITY_POST) && ($item['obj_type'] === ACTIVITY_OBJ_PHOTO)) { - $j = json_decode($item['object'],true); + $j = json_decode($item['obj'],true); if($j) { $item['body'] .= "\n\n" . (($j['body']) ? $j['body'] : $j['bbcode']); $item['sig'] = ''; -- cgit v1.2.3