Esempio n. 1
0
 static function uninstall()
 {
     global $DB;
     $displayPreference = new DisplayPreference();
     $displayPreference->deleteByCriteria(array('itemtype' => __CLASS__));
     // Remove dropdowns localization
     $dropdownTranslation = new DropdownTranslation();
     $dropdownTranslation->deleteByCriteria(array("itemtype = 'PluginSimcardSimcardSize'"), 1);
     $table = getTableForItemType(__CLASS__);
     $DB->query("DROP TABLE IF EXISTS `{$table}`");
 }
Esempio n. 2
0
 static function uninstall()
 {
     global $DB;
     foreach (array('DisplayPreference', 'Bookmark') as $itemtype) {
         $item = new $itemtype();
         $item->deleteByCriteria(array('itemtype' => __CLASS__));
     }
     // Remove dropdowns localization
     $dropdownTranslation = new DropdownTranslation();
     $dropdownTranslation->deleteByCriteria(array("itemtype = 'PluginSimcardSimcardType'"), 1);
     $table = getTableForItemType(__CLASS__);
     $DB->query("DROP TABLE IF EXISTS `{$table}`");
 }
Esempio n. 3
0
 /**
  * Clean translations associated to a dropdown
  *
  * @since version 0.85
  **/
 function cleanTranslations()
 {
     //Do not try to clean is dropdown translation is globally off
     if (DropdownTranslation::isDropdownTranslationActive()) {
         $translation = new DropdownTranslation();
         $translation->deleteByCriteria(array('itemtype' => get_class($this), 'items_id' => $this->getID()));
     }
 }