[Tickets #10439] Content_Tagger->getObjects: sql inner joins error

bugs at horde.org bugs at horde.org
Thu Aug 18 08:43:48 UTC 2011


BITTE NICHT AUF DIESE NACHRICHT ANTWORTEN. NACHRICHTEN AN DIESE  
E-MAIL-ADRESSE WERDEN NICHT GELESEN.

Ticket-URL: http://bugs.horde.org/ticket/10439
------------------------------------------------------------------------------
  Ticket           | 10439
  Erstellt Von     | roman at stachura.ch
  Zusammenfassung  | Content_Tagger->getObjects: sql  inner joins error
  Warteschlange    | Content
  Version          | 1.0.1
  Typ              | Bug
  Status           | Unconfirmed
  Priorität        | 1. Low
  Milestone        |
  Patch            | 1
  Zuständige       |
------------------------------------------------------------------------------


roman at stachura.ch (2011-08-18 08:43) hat geschrieben:

in the class Content_Tagger the
public function  getObjects has a some error in the sql. --> inner join.

The _ensureObject($args['objectId']) is not working this way.

this patch should fix it.



getObjects($args){

if (isset($args['objectId'])) {

    //$args['objectId'] =  
current($this->_objectManager->ensureObject($args['objectId']));
    (int)$objectId = $this->_ensureObject($args['objectId']);

    $sql = $this->_db->addLimitOffset('

             SELECT tagged2.object_id AS object_id, object_name
             FROM (' . $inner . ') AS t1
             INNER JOIN ' . $this->_tagged . ' AS tagged2
             ON t1.tag_id = tagged2.tag_id
             INNER JOIN ' . $this->_t('objects') . ' AS objects
             ON objects.object_id = tagged2.object_id
             WHERE tagged2.object_id != ' . $objectId . '
             GROUP BY t2.object_id',
             array('limit' => $radius)
    );

}
}



roman at stachura.ch (2011-08-18 08:43) uploaded:  
0001-getObjects-function-correct-sql-inner-join.patch

http://bugs.horde.org/h/services/download/?module=whups&actionID=download_file&file=0001-getObjects-function-correct-sql-inner-join.patch&ticket=10439&fn=%2F0001-getObjects-function-correct-sql-inner-join.patch





More information about the bugs mailing list