diff --git a/blockchains/golos/apps/profiles/donate.php b/blockchains/golos/apps/profiles/donate.php deleted file mode 100644 index df441c2..0000000 --- a/blockchains/golos/apps/profiles/donate.php +++ /dev/null @@ -1,40 +0,0 @@ - \ No newline at end of file diff --git a/blockchains/golos/apps/profiles/index.php b/blockchains/golos/apps/profiles/index.php index d0ae083..8bab8ef 100644 --- a/blockchains/golos/apps/profiles/index.php +++ b/blockchains/golos/apps/profiles/index.php @@ -39,10 +39,48 @@ function generateAppPages($blockchain_snippet) {

Донат

-'; -$pages .= file_get_contents($conf['siteUrl'].'blockchains/golos/apps/profiles/donate.php'); +'; if (!isset(pageUrl()[3])) { -$data['title'] .= ' - основное'; + $data['title'] .= ' - основное'; $data['description'] .= ' - основное'; $data['content'] = $blockchain_snippet; $data['content'] .= $pages; diff --git a/blockchains/golos/apps/profiles/page/feed.php b/blockchains/golos/apps/profiles/page/feed.php index 60fce88..fdcfcbf 100644 --- a/blockchains/golos/apps/profiles/page/feed.php +++ b/blockchains/golos/apps/profiles/page/feed.php @@ -136,10 +136,6 @@ function transliteration($tag_en, $mode = 'torus') if (isset($metadata['tags'])) { $tegi = $metadata['tags']; } - $filter_teg = array(); - - if ($content['author'] !== 'now') { - if (!count(array_intersect($tegi, $filter_teg))) { $rowCount++; if ($rowCount === FEED_LIMIT + 1) { @@ -159,15 +155,15 @@ function transliteration($tag_en, $mode = 'torus') '.$curation_procent.'% '; $tags_str = ''; -foreach ($tegi as $teg) { - $taging = transliteration($teg, 'torus'); +if (isset($tegi) && count($tegi) > 0 && is_array($tegi)) { + foreach ($tegi as $teg) { + $taging = transliteration($teg, 'torus'); - $tags_str .= '' . $taging . ', '; - } + $tags_str .= '' . $taging . ', '; + } $tags_str = substr($tags_str,0,-2); - $result['content'] .= $tags_str.''; } - } + $result['content'] .= $tags_str.''; } // Конец цикла $result['nextIsExists'] = (isset($newStartAuthor) && !is_null($newStartAuthor) ? true : false); if (isset($result['nextIsExists']) && $result['nextIsExists']) { diff --git a/blockchains/hive/apps/profiles/page/feed.php b/blockchains/hive/apps/profiles/page/feed.php index 2f1357b..51864c3 100644 --- a/blockchains/hive/apps/profiles/page/feed.php +++ b/blockchains/hive/apps/profiles/page/feed.php @@ -132,12 +132,9 @@ function transliteration($tag_en, $mode = 'torus') $created = date('j', $created2).' '.$month[$month2].' '.date('Y г. H:i:s', $created2); $metadata = json_decode($content['json_metadata'], true); $tegi = []; -$filter_teg = array(); if (isset($metadata) && isset($metadata['tags'])) { $tegi = $metadata['tags']; } - - if ($content['author'] !== 'now') { $rowCount++; if ($rowCount === FEED_LIMIT + 1) { @@ -155,16 +152,17 @@ function transliteration($tag_en, $mode = 'torus') '; if (isset($metadata['tags'])) { $tags_str = ''; + if (isset($tegi) && count($tegi) > 0 && is_array($tegi)) { foreach ($tegi as $teg) { $taging = transliteration($teg, 'torus'); $tags_str .= '' . $taging . ', '; } $tags_str = substr($tags_str,0,-2); + } $result['content'] .= $tags_str; } $result['content'] .= ''; -} } // Конец цикла $result['nextIsExists'] = (isset($newStartAuthor) && !is_null($newStartAuthor) ? true : false); if (isset($result['nextIsExists']) && $result['nextIsExists']) { diff --git a/blockchains/serey/apps/profiles/page/feed.php b/blockchains/serey/apps/profiles/page/feed.php index f96a6f2..f037460 100644 --- a/blockchains/serey/apps/profiles/page/feed.php +++ b/blockchains/serey/apps/profiles/page/feed.php @@ -133,10 +133,7 @@ function transliteration($tag_en, $mode = 'torus') $metadata = json_decode($content['json_metadata'], true); if (isset($metadata['tags'])) { $tegi = $metadata['tags']; - $filter_teg = array(); } - - if ($content['author'] !== 'now') { $rowCount++; if ($rowCount === FEED_LIMIT + 1) { @@ -154,16 +151,17 @@ function transliteration($tag_en, $mode = 'torus') '; if (isset($metadata['tags'])) { $tags_str = ''; + if (isset($tegi) && count($tegi) > 0 && is_array($tegi)) { foreach ($tegi as $teg) { $taging = transliteration($teg, 'torus'); $tags_str .= '' . $taging . ', '; } $tags_str = substr($tags_str,0,-2); + } $result['content'] .= $tags_str; } $result['content'] .= ''; -} } // Конец цикла if (!isset($newStartAuthor)) $newStartAuthor = null; $result['nextIsExists'] = (isset($newStartAuthor) && !is_null($newStartAuthor) ? true : false); diff --git a/blockchains/steem/apps/profiles/page/feed.php b/blockchains/steem/apps/profiles/page/feed.php index 4baeb97..16bf84f 100644 --- a/blockchains/steem/apps/profiles/page/feed.php +++ b/blockchains/steem/apps/profiles/page/feed.php @@ -132,13 +132,9 @@ function transliteration($tag_en, $mode = 'torus') $created = date('j', $created2).' '.$month[$month2].' '.date('Y г. H:i:s', $created2); $metadata = json_decode($content['json_metadata'], true); $tegi = []; - $filter_teg = array(); if (isset($metadata) && isset($metadata['tags'])) { $tegi = $metadata['tags']; } - - if ($content['author'] !== 'now') { - if (!count(array_intersect($tegi, $filter_teg))) { $rowCount++; if ($rowCount === FEED_LIMIT + 1) { @@ -155,15 +151,15 @@ function transliteration($tag_en, $mode = 'torus') ' . $content['author'] . ' '; $tags_str = ''; +if (isset($tegi) && count($tegi) > 0 && is_array($tegi)) { foreach ($tegi as $teg) { $taging = transliteration($teg, 'torus'); $tags_str .= '' . $taging . ', '; } $tags_str = substr($tags_str,0,-2); - $result['content'] .= $tags_str.''; } - } + $result['content'] .= $tags_str.''; } // Конец цикла $result['nextIsExists'] = (isset($newStartAuthor) && !is_null($newStartAuthor) ? true : false); if (isset($result['nextIsExists']) && $result['nextIsExists']) { diff --git a/functions.php b/functions.php index 80a491c..1cea515 100644 --- a/functions.php +++ b/functions.php @@ -294,10 +294,14 @@ function getPage($url) { $cache_url = 'caches/ohlc-'.$coin.'_'.$vs_currency; } else if (substr_count($url, '.') === 3) { $service = explode('/', $url)[3]; - [$name, $params] = explode('?', $service); - $params = str_replace('&', '-', $params); - $params = str_replace('=', '', $params); + if (strpos('?', $service) !== false) { + [$name, $params] = explode('?', $service); + $params = str_replace('&', '-', $params); + $params = str_replace('=', '', $params); $cache_url = 'caches/'.$name.'-'.$params; + } else { + $cache_url = 'caches/'.$service; + } } $cache_file = $cache_url.'.cache';