1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-13 17:12:07 +02:00

{NEWS_RATE: readonly=1} support.

This commit is contained in:
Cameron 2017-10-01 08:56:41 -07:00
parent 60f8111d27
commit c9f9226400
2 changed files with 11 additions and 4 deletions

View File

@ -382,9 +382,9 @@ class news_shortcodes extends e_shortcode
}
public function sc_news_rate($parm=null)
public function sc_news_rate($parm=array())
{
return e107::getRate()->render("news", $this->news_item['news_id']);
return e107::getRate()->render("news", $this->news_item['news_id'],$parm);
}

View File

@ -29,8 +29,15 @@ class rater {
}
$label = varset($options['label'],RATELAN_5);
$readonly = $this->checkrated($table, $id) ? '1' : '0';
if(!empty($options['readonly']))
{
$readonly = '1';
}
else
{
$readonly = $this->checkrated($table, $id) ? '1' : '0';
}
$hintArray = array(RATELAN_POOR,RATELAN_FAIR,RATELAN_GOOD,RATELAN_VERYGOOD,RATELAN_EXCELLENT);