Chinaunix首页 | 论坛 | 博客
  • 博客访问: 273285
  • 博文数量: 59
  • 博客积分: 1368
  • 博客等级: 中尉
  • 技术积分: 1071
  • 用 户 组: 普通用户
  • 注册时间: 2012-02-02 06:06
文章分类

全部博文(59)

文章存档

2012年(59)

我的朋友

分类: 系统运维

2012-02-20 17:28:58

1 安装出错:
1.1 /install/database/database.php
  1. CREATE TABLE IF NOT EXISTS article_type (
  2.   id_type int(11) unsigned NOT NULL auto_increment,
  3.   type varchar(50) collate utf8_unicode_ci NOT NULL,
  4.   ordering int(11) default 0,
  5.   description text NOT NULL,
  6.   type_flag TINYINT( 1 ) NOT NULL default 0,
  7.   PRIMARY KEY (id_type)
  8. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 COMMENT='0.9.7';
  1. INSERT INTO setting VALUES (NULL, 'default_admin_lang', 'en', NULL);
  2. INSERT INTO setting VALUES (NULL, 'ionize_version', '0.9.7', NULL);
  3. INSERT INTO setting VALUES (NULL, 'media_upload_mode', 'multiple', NULL);
同理需要修改database.xml

1.2 /install/demo_data.sql
  1. DELETE FROM `setting` WHERE `name`='site_title';
  2. INSERT INTO `setting` VALUES(NULL, 'site_title', 'My Website', 'en');

  3. INSERT INTO `setting` VALUES (NULL,'thumb_430','width,430,,',NULL);
  4. INSERT INTO `setting` VALUES (NULL,'thumb_540','width,540,,',NULL);
  5. INSERT INTO `setting` VALUES (NULL,'thumb_150','width,150,true,true',NULL);
  6. INSERT INTO `setting` VALUES (NULL,'thumb_940','width,940,,',NULL);
  7. INSERT INTO `setting` VALUES (NULL,'thumb_280','width,280,,true',NULL);

2 Static translations的This module has default language files for:出错
/application/controllers/admin/translation.php 596行
  1. function _get_modules_translation_files()
  2.     {
  3.         $data = array();
  4.         
  5.         // Installed Modules : includes the $modules var
  6.         require(APPPATH.'config/modules.php');
  7.         
  8.         // Sort modules by name
  9.         natcasesort($modules);

  10.         // Modules languages files : Including. Can be empty
  11.         foreach($modules as $module)
  12.         {
  13.             $paths = glob(MODPATH.$module.'/language/*');
  14.             
  15.             foreach($paths as $path)
  16.             {
  17.                 if (is_file($path.'/'.strtolower($module).'_lang'.EXT))
  18.                 {
  19.                     //$path = substr($path, 0, -1);
  20.                     $data[$module][] = array_pop(explode('/', $path));
  21.                 }
  22.                 
  23.             }
  24.         }

  25.         return $data;
  26.     }
3 不能新建Article的Bug
修改/application/models/article_model.php 621行
  1. function save($data, $lang_data)
  2.     {
  3.         // New article : Created field
  4.         if( ! $data['id_article'] )
  5.             $data['created'] = $data['updated'] = date('Y-m-d H:i:s');
  6.         // Existing article : Update date
  7.         else
  8.             $data['updated'] = date('Y-m-d H:i:s');

  9.         // Be sure URLs are unique
  10.         $this->set_unique_urls($lang_data, $data['id_article']);
  11.         
  12.     
  13.         // Dates
  14.         $data['publish_on'] = ($data['publish_on']) ? getMysqlDatetime($data['publish_on']) : '0000-00-00';
  15.         $data['publish_off'] = ($data['publish_off']) ? getMysqlDatetime($data['publish_off']) : '0000-00-00';
  16.         $data['comment_expire'] = ($data['comment_expire']) ? getMysqlDatetime($data['comment_expire']) : '0000-00-00';
  17.         $data['logical_date'] = ($data['logical_date']) ? getMysqlDatetime($data['logical_date']) : '0000-00-00';
  18.         
  19.         //others by chenxf
  20.         $data['indexed'] = intval($data['indexed']);
  21.         $data['id_category'] = intval($data['id_category']);
  22.         $data['flag'] = intval($data['flag']);

  23.         // Article saving
  24.         return parent::save($data, $lang_data);
  25.     }


阅读(825) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~