<?php

/**
 * Subclass for representing a row from the 'tblblogentryscore' table.
 *
 * 
 *
 * @package lib.model
 */ 
class Tblblogentryscore extends BaseTblblogentryscore
{
  
  public static function canVote($v) {
    if(blogStore::$userId == 0) {
      return true;
    }
    if(blogStore::$userId != "" && blogStore::$userId != 0) {
        //check user was voted
        $rowVote = TblblogentryscorePeer::retrieveByPK($v,blogStore::$userId);
        if($rowVote) {
          if($rowVote->getScoreEntry() != "") {
            return $rowVote->getScoreValue();
          }
        }
      }
      return false;
   }
}

