[ Index ]

Source Code Reference for V1.00

title

Body

[close]

/modules/links/ -> links.class.php (source)

   1  <?php /* $Id: links.class.php 40 2008-02-11 12:11:44Z pedroix $ $URL: https://web2project.svn.sourceforge.net/svnroot/web2project/trunk/modules/links/links.class.php $ */
   2  if (!defined('W2P_BASE_DIR')) {
   3      die('You should not access this file directly.');
   4  }
   5  
   6  require_once ($AppUI->getSystemClass('w2p'));
   7  require_once ($AppUI->getModuleClass('tasks'));
   8  require_once ($AppUI->getModuleClass('projects'));
   9  /**
  10   * Link Class
  11   */
  12  class CLink extends CW2pObject {
  13  
  14      var $link_id = null;
  15      var $link_project = null;
  16      var $link_url = null;
  17      var $link_task = null;
  18      var $link_name = null;
  19      var $link_parent = null;
  20      var $link_description = null;
  21      var $link_owner = null;
  22      var $link_date = null;
  23      var $link_category = null;
  24  
  25  	function CLink() {
  26          $this->CW2pObject('links', 'link_id');
  27      }
  28  
  29  	function check() {
  30          // ensure the integrity of some variables
  31          $this->link_id = intval($this->link_id);
  32          $this->link_parent = intval($this->link_parent);
  33          $this->link_category = intval($this->link_category);
  34          $this->link_task = intval($this->link_task);
  35          $this->link_project = intval($this->link_project);
  36  
  37          return null; // object is ok
  38      }
  39  
  40  	function delete() {
  41          global $w2Pconfig;
  42          $this->_message = "deleted";
  43  
  44          // delete the main table reference
  45          $q = new DBQuery();
  46          $q->setDelete('links');
  47          $q->addWhere('link_id = ' . (int)$this->link_id);
  48          if (!$q->exec()) {
  49              return db_error();
  50          }
  51          return null;
  52      }
  53  }
  54  ?>


Generated: Fri Jan 9 03:00:02 2009 Cross-referenced by PHPXref 0.7