]> _ Git - physioassist.git/commitdiff
#simeox Fix EN locale (environment setting problem), disable infinite news loop and...
authorstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 9 May 2016 12:28:51 +0000 (12:28 +0000)
committerstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 9 May 2016 12:28:51 +0000 (12:28 +0000)
framework/application/Simeox/News.php
index.php

index b5f20eaa051e81d4f853c31c2f04f2c3cc600dfd..cd1c758955de38682f3490ec775af5f216955a78 100644 (file)
@@ -7,7 +7,7 @@ class Simeox_News {
     public static function getNews($page = 1, $perPage = 3) {
 
         //###TEMPORARY! Produce endless stream of data for testing infinite scroll
-        $page = ($page > 1) ? 1 : $page;
+        //$page = ($page > 1) ? 1 : $page;
         //fb('Fetching page #'. $page);
 
 
@@ -24,6 +24,8 @@ class Simeox_News {
 
         foreach ($news_result as $n) {
 
+            if (empty($n->headline)) continue; // Skip untranslated / empty articles
+
             $date = new CubeIT_Date($n->date, CubeIT_Date::MYSQL);
 
             $news[] = array(
index 73a995e70b1746c9f2b66c6ca574ad5851820516..bda152244829d78ba17dd786e842b64b508e384f 100644 (file)
--- a/index.php
+++ b/index.php
@@ -4,7 +4,7 @@ $start = microtime(true);
 ini_set('log_errors', '1');
 ini_set('error_log', dirname(__FILE__) . '/log/php_error.log');
 
-if ($_SERVER['HTTP_HOST'] == 'simeox.dev.cubedesigners.com') {
+if (strpos($_SERVER['HTTP_HOST'], 'dev.cubedesigners.com') !== false) {
        define('APPLICATION_ENV', 'testing');
 } else if ($_SERVER['HTTP_HOST'] == 'www.') {
        define('APPLICATION_ENV', 'production');