* Moved all direct SQL statements as constants into Sql object
* Removed redundant call for HopObject.log() in Admin.update() method
This commit is contained in:
parent
499e8d97b9
commit
33ef009f20
5 changed files with 30 additions and 22 deletions
|
@ -524,11 +524,8 @@ Story.prototype.referrers_macro = function(param, limit) {
|
|||
}
|
||||
|
||||
var self = this;
|
||||
var sql = new Sql();
|
||||
sql.retrieve("select referrer, count(*) as requests from " +
|
||||
"log where context_type = 'Story' and context_id = $0 and action = " +
|
||||
"'main' and created > date_add(now(), interval -1 day) group " +
|
||||
"by referrer order by requests desc, referrer asc", this._id);
|
||||
var sql = new Sql;
|
||||
sql.retrieve(Sql.REFERRERS, "Story", this._id);
|
||||
|
||||
res.push();
|
||||
var n = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue