testlink/lib/functions attachmentrepository.class.php,1.22,1.23

0 views
Skip to first unread message

Schlundus

unread,
Jun 15, 2009, 4:40:49 PM6/15/09
to asi...@users.sourceforge.net
Update of /cvsroot/testlink/testlink/lib/functions
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv26268/lib/functions

Modified Files:
attachmentrepository.class.php
Log Message:
more comments

Index: attachmentrepository.class.php
===================================================================
RCS file: /cvsroot/testlink/testlink/lib/functions/attachmentrepository.class.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** attachmentrepository.class.php 15 Jun 2009 20:14:59 -0000 1.22
--- attachmentrepository.class.php 15 Jun 2009 20:40:47 -0000 1.23
***************
*** 284,288 ****
* @param $id integer the database identifier of the attachment
* @param $dummy not used, only there to keep the interface equal to deleteAttachmentFromDB
! * @return interger returns tl::OK on success, tl::ERROR else
*/
protected function deleteAttachmentFromDB($id,$dummy = null)
--- 284,288 ----
* @param $id integer the database identifier of the attachment
* @param $dummy not used, only there to keep the interface equal to deleteAttachmentFromDB
! * @return integer returns tl::OK on success, tl::ERROR else
*/
protected function deleteAttachmentFromDB($id,$dummy = null)
***************
*** 292,295 ****
--- 292,302 ----
}

+ /**
+ * Deletes the attachment with the given database id
+ *
+ * @param $id integer the database identifier of the attachment
+ * @param $attachmentInfo array, optional information about the attachment
+ * @return integer returns tl::OK on success, tl::ERROR else
+ */
public function deleteAttachment($id,$attachmentInfo = null)
{
***************
*** 307,310 ****
--- 314,324 ----
}

+ /**
+ * Gets the contents of the attachments from the repository
+ *
+ * @param $id integer the database identifier of the attachment
+ * @param $attachmentInfo array, optional information about the attachment
+ * @return string the contents of the attachment or null on error
+ */
public function getAttachmentContent($id,$attachmentInfo = null)
{
***************
*** 323,326 ****
--- 337,346 ----
}

+ /**
+ * Gets the contents of the attachment given by it's database identifier from the filesystem
+ *
+ * @param $id integer the database identifier of the attachment
+ * @return string the contents of the attachment or null on error
+ */
protected function getAttachmentContentFromFS($id)
{
***************
*** 382,385 ****
--- 402,413 ----
}

+ /**
+ * Deletes all attachments of a certain object of a given type
+ *
+ * @param $fkid integer the id of the object whose attachments should be deleted
+ * @param $fkTableName the "type" of the object, or the table the object is stored in
+ *
+ * @return boolean returns bSuccess if all attachments are deleted, false else
+ */
public function deleteAttachmentsFor($fkid,$fkTableName)
{
***************
*** 402,405 ****
--- 430,439 ----
}

+ /**
+ * Reads the information about the attachment with the given database id
+ *
+ * @param $id integer the database identifier of the attachment
+ * @return array the information about the attachment
+ */
public function getAttachmentInfo($id)
{
***************
*** 413,416 ****
--- 447,458 ----
}

+ /**
+ * Reads all attachments for a certain object of a given type
+ *
+ * @param $fkid integer the id of the object whose attachments should be read
+ * @param $fkTableName the "type" of the object, or the table the object is stored in
+ *
+ * @return arrays returns an array with the attachments of the objects, or null on error
+ */
public function getAttachmentInfosFor($fkid,$fkTableName)
{
***************
*** 428,431 ****
--- 470,481 ----
}

+ /**
+ * Yields all attachmentids for a certain object of a given type
+ *
+ * @param $fkid integer the id of the object whose attachments should be read
+ * @param $fkTableName the "type" of the object, or the table the object is stored in
+ *
+ * @return arrays returns an array with the attachments of the objects, or null on error
+ */
public function getAttachmentIDsFor($fkid,$fkTableName)
{

Reply all
Reply to author
Forward
0 new messages