Thumbnail text and content tag fix
This commit is contained in:
parent
a428ebdd73
commit
1ba751acb3
2 changed files with 6 additions and 4 deletions
|
@ -572,6 +572,7 @@ class MainController extends AppController {
|
||||||
$resultSet = [];
|
$resultSet = [];
|
||||||
|
|
||||||
// get avg prices
|
// get avg prices
|
||||||
|
/*
|
||||||
$conn_local = ConnectionManager::get('localdb');
|
$conn_local = ConnectionManager::get('localdb');
|
||||||
$stmt_price = $conn_local->execute("SELECT AVG(USD) AS AvgUSD, DATE_FORMAT(Created, '$sqlDateFormat') AS TimePeriod " .
|
$stmt_price = $conn_local->execute("SELECT AVG(USD) AS AvgUSD, DATE_FORMAT(Created, '$sqlDateFormat') AS TimePeriod " .
|
||||||
"FROM PriceHistory WHERE DATE_FORMAT(Created, '$sqlDateFormat') >= ? GROUP BY TimePeriod ORDER BY TimePeriod ASC", [$start->format($dateFormat)]);
|
"FROM PriceHistory WHERE DATE_FORMAT(Created, '$sqlDateFormat') >= ? GROUP BY TimePeriod ORDER BY TimePeriod ASC", [$start->format($dateFormat)]);
|
||||||
|
@ -582,6 +583,7 @@ class MainController extends AppController {
|
||||||
}
|
}
|
||||||
$resultSet[$price->TimePeriod]['AvgUSD'] = (float) $price->AvgUSD;
|
$resultSet[$price->TimePeriod]['AvgUSD'] = (float) $price->AvgUSD;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
$conn = ConnectionManager::get('default');
|
$conn = ConnectionManager::get('default');
|
||||||
// get avg block sizes for the time period
|
// get avg block sizes for the time period
|
||||||
|
|
|
@ -29,7 +29,7 @@ class Claim extends Entity {
|
||||||
$ctTag = 'image';
|
$ctTag = 'image';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$ctTag && $this->claim_type == 1) {
|
if (!$ctTag && $this->claim_type == 2) {
|
||||||
$ctTag = 'identity';
|
$ctTag = 'identity';
|
||||||
}
|
}
|
||||||
return $ctTag;
|
return $ctTag;
|
||||||
|
@ -37,11 +37,11 @@ class Claim extends Entity {
|
||||||
|
|
||||||
function getAutoThumbText() {
|
function getAutoThumbText() {
|
||||||
$autoThumbText = '';
|
$autoThumbText = '';
|
||||||
if ($this->claim_type == 1) {
|
if ($this->claim_type == 2) {
|
||||||
$autoThumbText = strtoupper(substr($this->name, 1, min( strlen($this->name), 3 )));
|
$autoThumbText = strtoupper(substr($this->name, 1, min(strlen($this->name), 10)));
|
||||||
} else {
|
} else {
|
||||||
$str = (strlen(trim($this->title)) > 0) ? $this->title : $this->name;
|
$str = (strlen(trim($this->title)) > 0) ? $this->title : $this->name;
|
||||||
$autoThumbText = strtoupper(substr($str, 0, min (strlen($str), 2 )));
|
$autoThumbText = strtoupper(substr($str, 0, min(strlen($str), 5)));
|
||||||
}
|
}
|
||||||
return $autoThumbText;
|
return $autoThumbText;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue