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 = [];
|
||||
|
||||
// get avg prices
|
||||
/*
|
||||
$conn_local = ConnectionManager::get('localdb');
|
||||
$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)]);
|
||||
|
@ -582,6 +583,7 @@ class MainController extends AppController {
|
|||
}
|
||||
$resultSet[$price->TimePeriod]['AvgUSD'] = (float) $price->AvgUSD;
|
||||
}
|
||||
*/
|
||||
|
||||
$conn = ConnectionManager::get('default');
|
||||
// get avg block sizes for the time period
|
||||
|
|
|
@ -29,7 +29,7 @@ class Claim extends Entity {
|
|||
$ctTag = 'image';
|
||||
}
|
||||
|
||||
if (!$ctTag && $this->claim_type == 1) {
|
||||
if (!$ctTag && $this->claim_type == 2) {
|
||||
$ctTag = 'identity';
|
||||
}
|
||||
return $ctTag;
|
||||
|
@ -37,11 +37,11 @@ class Claim extends Entity {
|
|||
|
||||
function getAutoThumbText() {
|
||||
$autoThumbText = '';
|
||||
if ($this->claim_type == 1) {
|
||||
$autoThumbText = strtoupper(substr($this->name, 1, min( strlen($this->name), 3 )));
|
||||
if ($this->claim_type == 2) {
|
||||
$autoThumbText = strtoupper(substr($this->name, 1, min(strlen($this->name), 10)));
|
||||
} else {
|
||||
$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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue