Beispiel #1
0
 public function remove()
 {
     $q = $this->_getQuery();
     $q->dropTable('history');
     $q->exec();
     return parent::remove();
 }
Beispiel #2
0
 public function install()
 {
     $result = $this->_checkRequirements();
     if (!$result) {
         return false;
     }
     $q = $this->_getQuery();
     $q->createTable('links');
     $q->createDefinition('(
         link_id int( 11 ) NOT NULL AUTO_INCREMENT ,
         link_url varchar( 255 ) NOT NULL default "",
         link_project int( 11 ) NOT NULL default "0",
         link_task int( 11 ) NOT NULL default "0",
         link_name varchar( 255 ) NOT NULL default "",
         link_parent int( 11 ) default "0",
         link_description text,
         link_owner int( 11 ) default "0",
         link_date datetime default NULL ,
         link_icon varchar( 20 ) default "obj/",
         link_category int( 11 ) NOT NULL default "0",
         PRIMARY KEY ( link_id ) ,
         KEY idx_link_task ( link_task ) ,
         KEY idx_link_project ( link_project ) ,
         KEY idx_link_parent ( link_parent )
         ) ENGINE = MYISAM DEFAULT CHARSET=utf8 ');
     if (!$q->exec()) {
         return false;
     }
     $i = 0;
     $linkTypes = array('Unknown', 'Document', 'Application');
     //TODO: refactor as proper sysvals handling
     foreach ($linkTypes as $linkType) {
         $q = $this->_getQuery();
         $q->addTable('sysvals');
         $q->addInsert('sysval_key_id', 1);
         $q->addInsert('sysval_title', 'LinkType');
         $q->addInsert('sysval_value', $linkType);
         $q->addInsert('sysval_value_id', $i);
         $q->exec();
         $i++;
     }
     return parent::install();
 }
Beispiel #3
0
 public function remove()
 {
     $q = $this->_getQuery();
     $q->dropTable('resources');
     $q->exec();
     $q->clear();
     $q->dropTable('resource_tasks');
     $q->exec();
     $q->clear();
     $q->setDelete('sysvals');
     $q->addWhere("sysval_title = 'ResourceTypes'");
     $q->exec();
     return parent::remove();
 }
 public function __construct(w2p_Core_CAppUI $AppUI = null, array $config = null, w2p_Database_Query $query = null)
 {
     parent::__construct($AppUI, $config, $query);
     trigger_error(get_class($this) . " has been deprecated in v3.1 and will be removed by v4.0. Please use " . get_parent_class($this) . " instead.", E_USER_NOTICE);
 }
Beispiel #5
0
 public function configure()
 {
     $this->_AppUI->redirect('m=projectdesigner&a=configure');
     return parent::configure();
 }