[Hiki-dev] 0.5-devel-20030627 の update_proc について

Back to archive index

猫罰 n5v2****@cds*****
2003年 6月 28日 (土) 17:10:57 JST


お疲れ様です。猫罰です。

表題の件ですが、このバージョンに置き換えた所、
update_proc を利用しているプラグインが動かなくなってしまいました。

エラーなども出ていないので、
どうも呼び出し自体が行われていないようなのです。

具体的なソースは、

--------------------------------------------------------------------
add_update_proc {
  ref_re = /(\[\[\.\/([^\|:]+?)\]\])/
  ref2_re = /\[\[\.\//
  pre_re = /^\s+/
  lines =****@db*****( @page )
  md5hex =****@db*****( @page )

  flag = false

  content = ''
  lines.each { |line|
    if pre_re !~ line
      line.gsub!(ref_re) {
        flag = true
        $1.sub(ref2_re, "[[#{@page}/")
      }
    end
    content << line
  }

  @db.save( @page, content.gsub(/\r/, ''), md5hex ) if flag
}
--------------------------------------------------------------------

こんな感じです。

以前の 0.5-devel-20030612 では、これで良かったのですが、
何か変更があったのでしょうか。

--------------------------------------------------------------------
add_update_proc {
  lines =****@db*****( @page )
  md5hex =****@db*****( @page )

  content = ''
  lines.each { |line|
    if pre_re !~ line
      line = "* " + line
    end
    content << line
  }

  @db.save( @page, content.gsub(/\r/, ''), md5hex )
}
--------------------------------------------------------------------

でもダメでした。

#以上です。よろしくお願いします。

--
猫罰 <n5v2****@cds*****>
     <http://www22.cds.ne.jp/~n5v2/cgi-bin/hiki/>




Hiki-dev メーリングリストの案内
Back to archive index