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:
parent
60f8111d27
commit
c9f9226400
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user