Create  Edit  Diff  FrontPage  Index  Search  Changes  History  Source  RSS  wikifarm  Admin

PrefShimaneCMS's Wiki - FrontPage Diff

  • Added parts are displayed like this.
  • Deleted parts are displayed like this.

![[島根県CMS|http://projects.netlab.jp/PrefShimaneCMS/]]について

!!Ubuntu 8.04 にバージョン1.0.2をインストール

!!修正したところ

!!!doc/INSTALL
20行目 librmagick-ruby1.8 のインストールができないため,このパッケージを除いて実行(2008/5/6現在)

32行目 gemパッケージのインストールで,rails もインストール

      $ sudo gem install rails rake scrapi tidy

*「--include-dependencies」のオプションは不要
*RubyGems
修正箇所?最新版(2008/5/6現在1.1.1)では,「gem」コマンドは「gem1.8」になっている

!!!db/migrate/004_add_table_sections.rb
4行目 code の属性を integer に変更
     table.column(:code, :integer)

!!!app/models/page_content.rb
373行〜394行で,「arg1」を「id」に修正

  def publish
    if !(waiting_page = self.page.waiting_page) or self == waiting_page
      # destroy cancel_page jobs yet to be done by the newly set begin_date.
      Job.destroy_all(['action = ? AND id = ? AND datetime >= ?',
                     'cancel_page', page.id, self.begin_date || Time.now])
      # destroy remainig create jobs.
      Job.destroy_all(['action = ? AND id = ? AND datetime <= ?',
                     'create_page', page.id, Time.now])
    else
      Job.destroy_all(['action = ? AND id = ? AND datetime >= ? AND NOT datetime = ?',
                     'cancel_page', page.id, self.begin_date || Time.now, waiting_page.end_date])
      Job.destroy_all(['action = ? AND id = ? AND datetime <= ? AND NOT datetime = ?',
                     'create_page', page.id, Time.now, waiting_page.begin_date])
    end

    Job.create(:action => 'create_page',
               :id => self.page_id,
               :datetime => self.begin_date || Time.now)
    Job.create(:action => 'cancel_page',
               :id => self.page_id,
               :datetime => self.end_date) if self.end_date
  end