@@ -62,6 +62,8 @@ public function viewAction()
62
62
$ startDate = date ('Y-m-d H:i:s ' , $ startDate );
63
63
$ endDate = date ('Y-m-d H:i:s ' , $ endDate );
64
64
65
+ $ userId = $ this ->userSession ->Dao ? $ this ->userSession ->Dao ->getKey () : null ;
66
+
65
67
$ trendIds = explode (' ' , trim (str_replace (', ' , ' ' , $ trendId )));
66
68
$ this ->view ->trends = array ();
67
69
foreach ($ trendIds as $ trendId )
@@ -72,7 +74,7 @@ public function viewAction()
72
74
{
73
75
throw new Zend_Exception ('Read permission required on the community ' , 403 );
74
76
}
75
- $ this ->view ->json ['tracker ' ]['scalars ' ][] = $ this ->Tracker_Trend ->getScalars ($ trend , $ startDate , $ endDate );
77
+ $ this ->view ->json ['tracker ' ]['scalars ' ][] = $ this ->Tracker_Trend ->getScalars ($ trend , $ startDate , $ endDate, $ userId );
76
78
$ this ->view ->json ['tracker ' ]['trends ' ][] = $ trend ;
77
79
$ this ->view ->trends [] = $ trend ;
78
80
}
@@ -117,7 +119,7 @@ public function viewAction()
117
119
if (isset ($ rightTrend ))
118
120
{
119
121
$ this ->view ->json ['tracker ' ]['rightTrend ' ] = $ rightTrend ;
120
- $ this ->view ->json ['tracker ' ]['rightScalars ' ] = $ this ->Tracker_Trend ->getScalars ($ rightTrend , $ startDate , $ endDate );
122
+ $ this ->view ->json ['tracker ' ]['rightScalars ' ] = $ this ->Tracker_Trend ->getScalars ($ rightTrend , $ startDate , $ endDate, $ userId );
121
123
}
122
124
$ this ->view ->json ['tracker ' ]['initialStartDate ' ] = date ('n/j/Y ' , strtotime ($ startDate ));
123
125
$ this ->view ->json ['tracker ' ]['initialEndDate ' ] = date ('n/j/Y ' , strtotime ($ endDate ));
@@ -149,6 +151,9 @@ public function scalarsAction()
149
151
$ rightTrendId = $ this ->_getParam ('rightTrendId ' );
150
152
$ startDate = $ this ->_getParam ('startDate ' );
151
153
$ endDate = $ this ->_getParam ('endDate ' );
154
+
155
+ $ userId = $ this ->userSession ->Dao ? $ this ->userSession ->Dao ->getKey () : null ;
156
+
152
157
if (!isset ($ trendId ))
153
158
{
154
159
throw new Zend_Exception ('Must pass trendId parameter ' );
@@ -166,7 +171,7 @@ public function scalarsAction()
166
171
{
167
172
throw new Zend_Exception ('Read permission required on the community ' , 403 );
168
173
}
169
- $ scalars [] = $ this ->Tracker_Trend ->getScalars ($ trend , $ startDate , $ endDate );
174
+ $ scalars [] = $ this ->Tracker_Trend ->getScalars ($ trend , $ startDate , $ endDate, $ userId );
170
175
}
171
176
$ retVal = array ('status ' => 'ok ' , 'scalars ' => $ scalars );
172
177
0 commit comments