示例#1
0
 function _checkDBCacheStructure()
 {
     JCacheStorageJfdb::setupDB();
     $db =& JFactory::getDBO();
     $sql = "SHOW COLUMNS FROM #__dbcache LIKE 'value'";
     $db->setQuery($sql);
     $data = $db->loadObject();
     if (isset($data) && strtolower($data->Type) !== "mediumblob") {
         $sql = "DROP TABLE #__dbcache";
         $db->setQuery($sql);
         $db->query();
         JCacheStorageJfdb::setupDB();
     }
 }
 public static function _checkDBCacheStructure()
 {
     //TODO : sbou revoir la methode de cache
     return true;
     JCacheStorageJfdb::setupDB();
     $db = JFactory::getDBO();
     $sql = "SHOW COLUMNS FROM #__dbcache LIKE 'value'";
     $db->setQuery($sql);
     $data = $db->loadObject();
     if (isset($data) && strtolower($data->Type) !== "mediumblob") {
         $sql = "DROP TABLE #__dbcache";
         $db->setQuery($sql);
         $db->query();
         JCacheStorageJfdb::setupDB();
     }
 }
示例#3
0
 /**
  * method to run after an install/update/uninstall method
  *
  * @return void
  **/
 public function postflight($type, $parent)
 {
     // $parent is the class calling this method
     // $type is the type of change (install, update or discover_install)
     if ($type == 'install' || $type == 'update') {
         jimport('joomfish.cache.jfdb');
         $result = JCacheStorageJfdb::setupDB();
     }
 }