OSDN Git Service

nucleus-jp/nucleus-next.git
11 years agoMERGE: リビジョン1868、1869。翻訳ファイルの整備と拡充
sakamocchi [Tue, 22 May 2012 05:26:30 +0000 (14:26 +0900)]
MERGE: リビジョン1868、1869。翻訳ファイルの整備と拡充

Nucleus Language Filesでダウンロード可能なファイルのうち、パッケージに含まれていないものを追加。
http://nucleuscms.org/languages.php

加えて、ファイルの先頭コメントを整理した。

Revision 1868:
code cleanup for translation files
rearrangement for comments in each header
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1868

Revision 1869:
ADD: new translation file from language repository
From:
http://nucleuscms.org/languages.php
Added:
el_Latn_GR.UTF-8.php
el_Latn_GR.WINDOWS-1253.php
hr_Latn_HR.UTF-8.php
hr_Latn_HR.WINDOWS-1250.php
id_Latn_ID.ISO-8859-1.php
id_Latn_ID.UTF-8.php
ku_Arab_TR.UTF-8.php
pl_Latn_PL.UTF-8.php
ro_Latn_RO.ISO-8859-1.php
ro_Latn_RO.UTF-8.php
sr_Cyrl_RS.UTF-8.php
ur_Arab_PK.UTF-8.php
vi_Latn_VN.UTF-8.php

11 years agoMERGE: リビジョン1866。NucleusPlugin::apply_plugin_options()のバグ修正
sakamocchi [Sun, 20 May 2012 13:27:37 +0000 (22:27 +0900)]
MERGE: リビジョン1866。NucleusPlugin::apply_plugin_options()のバグ修正

1. DBハンドラーを書き換えた際の修正漏れ
2. もともとのコードのおかしな箇所の修正。対象となるすべてのプラグインのキャッシュがアップデートされていなかった

Revision 1866:
FIX: bugs to fail to update options in
NucleusPlugin::apply_plugin_options()
1. Mis-written when applying new DB handler
2. original code bugs
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1866

11 years agoFIX: Blogクラスの不正なJavaScriptコードの修正。
sakamocchi [Sun, 20 May 2012 10:57:22 +0000 (19:57 +0900)]
FIX: Blogクラスの不正なJavaScriptコードの修正。

11 years agoCHANGE: Media/MediaObjectクラスにリサンプリング用メソッド・メンバーを追加
sakamocchi [Sat, 19 May 2012 14:47:47 +0000 (23:47 +0900)]
CHANGE: Media/MediaObjectクラスにリサンプリング用メソッド・メンバーを追加

追加:
Media::$thumbdir
Media::$algorism
Media::$image_mime
Media::responseResampledImage()
Media::storeResampledImage()
Media::sort_media_by_filename()

変更:
sort_media()をMedia::sort_media_by_timestamp()に

MediaObjectは下位互換性を考慮しつつ書きなおした。

11 years agoMERGE: リビジョン1864。Mediaクラス、MediaObjectクラスのコード整理。
sakamocchi [Sat, 19 May 2012 11:46:56 +0000 (20:46 +0900)]
MERGE: リビジョン1864。Mediaクラス、MediaObjectクラスのコード整理。

Revision 1864:
code cleanup for Media class and MediaObject class
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1864

11 years agoMERGE: リビジョン1863。Actions::ifCategory()の条件式を結合
sakamocchi [Sat, 19 May 2012 10:57:36 +0000 (19:57 +0900)]
MERGE: リビジョン1863。Actions::ifCategory()の条件式を結合

SQLクエリの発行回数を減らすため

Revision 1863:
CHANGE: concatinate if condition in Actions::ifCategory()
For reducing needless SQL querying.
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1863

11 years agoMERGE: リビジョン1861。Managerクラスのコード整理。
sakamocchi [Sat, 19 May 2012 04:15:13 +0000 (13:15 +0900)]
MERGE: リビジョン1861。Managerクラスのコード整理。

キャッシュ用のクラスメンバーに対するアクセス修飾子をprivateに変更。

Revision 1862:
code cleanup for Manager class
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1862

11 years agoFIX: 関数の引数に不適切な&を付与していたバグの修正
sakamocchi [Sat, 19 May 2012 04:04:13 +0000 (13:04 +0900)]
FIX: 関数の引数に不適切な&を付与していたバグの修正

11 years agoMERGE: リビジョン1860。Blogオブジェクトの作成にManagerクラスによるキャッシュ機構を利用
sakamocchi [Sat, 19 May 2012 03:53:30 +0000 (12:53 +0900)]
MERGE: リビジョン1860。Blogオブジェクトの作成にManagerクラスによるキャッシュ機構を利用

Manager::getObject()はキャッシュ機構を持つため、Blogクラスのコンストラクタを置き換えることでSQL文による不要な問い合わせを削減することができ、サーバー側の応答速度の改善につながる。

Revision 1860:
CHANGE: use cache machanism of Manager class to generate Blog object
Manager::getBlog() has cache mechanism. This commit replace
constructor of Blog class to Manager::getBlog() to reduce the number of
SQL query.
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1860

11 years agoMERGE: リビジョン1859。Item取得にManagerクラスによるキャッシュ機構を利用
sakamocchi [Sat, 19 May 2012 03:20:11 +0000 (12:20 +0900)]
MERGE: リビジョン1859。Item取得にManagerクラスによるキャッシュ機構を利用

Manager::getItem()はキャッシュ機構を持つため、Item::getItem()を置き換えることで、SQL文による不要な問い合わせを削減することができ、サーバー側の応答速度の改善につながる。

Revision 1859:
CHANGE: use cache machanism of Manager class to retrieve Item
Manager::getItem() has cache mechanism. This commit replace
Item::getItem() to Manager::getItem() to reduce the number of
SQL query.
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1859

11 years agoMERGE: コミット1858。Memberオブジェクトの作成にManagerクラスによるキャッシュ機構を利用
sakamocchi [Sat, 19 May 2012 03:19:16 +0000 (12:19 +0900)]
MERGE: コミット1858。Memberオブジェクトの作成にManagerクラスによるキャッシュ機構を利用

manager::getMember()はキャッシュ機構を持つため、Member::createFromId()を置き換えることで、SQL文による不要な問い合わせを削減することができ、サーバー側プログラムの応答速度の改善につながる。

Revision 1858:
CHANGE: use cache machanism of Manager class to generate Member object
Manager::getMember() has cache mechanism. This commit replace
Member::createFromID() to Manager::getMember() to reduce the number of
SQL query.
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms/trunk/?view=log

11 years agoADD: リビジョン<%benchmark%>タグの追加。
sakamocchi [Fri, 18 May 2012 16:16:29 +0000 (01:16 +0900)]
ADD: リビジョン<%benchmark%>タグの追加。

ページ生成時間の計測はglobalfunctions.phpがinclude()された際に開始。通常、globalfunctions.phpはconfig.phpからインクルードされるため、たいていのページでは常に開始時刻が記録されるだろう。
スキンに<%benchmark%>を記述することでスキンの「どこにでも」ベンチマーク情報を出力できる。

不要となった/benchmark.incは廃止した。

Revision 1857:
ADD: enable <%benchmark%> tag in whole skins.
For work to improving skin/template system. Start time is generated when
globalfunctions.php is included.
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1857

11 years agoCHANGE: 関数/メソッド命名規則に従いdecode_path_info()をdecodePathInfo()に変更
sakamocchi [Fri, 18 May 2012 09:36:30 +0000 (18:36 +0900)]
CHANGE: 関数/メソッド命名規則に従いdecode_path_info()をdecodePathInfo()に変更

関数/メソッドはUpperCamelCaseに、メンバーや変数はアンダースコアでつないだ文字列というルールがある。

11 years agoAdd: decode_path_info()を追加。globalfunctions.phpのコードを合わせて整理。
sakamocchi [Fri, 18 May 2012 15:20:54 +0000 (00:20 +0900)]
Add: decode_path_info()を追加。globalfunctions.phpのコードを合わせて整理。

11 years agoBlogクラスのコード整理
sakamocchi [Fri, 18 May 2012 05:21:20 +0000 (14:21 +0900)]
Blogクラスのコード整理

11 years agoaction.phpのコード整理
sakamocchi [Fri, 18 May 2012 05:10:17 +0000 (14:10 +0900)]
action.phpのコード整理

11 years agoActionクラスのコード整理
sakamocchi [Fri, 18 May 2012 05:09:27 +0000 (14:09 +0900)]
Actionクラスのコード整理

11 years agoMERGE: リビジョン1851。alertOnHeadersSentとalertOnSecurityRiskの初期化条件の変更
sakamocchi [Thu, 17 May 2012 14:25:59 +0000 (23:25 +0900)]
MERGE: リビジョン1851。alertOnHeadersSentとalertOnSecurityRiskの初期化条件の変更

Revision 1851:
FIX: the condition of alertOnHeadersSent and alertOnSecurityRisk
We did not be able to set them in config.php.
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1851

11 years agoMERGE:skinnable-masterブランチのインストールスクリプトをマージ
reine [Wed, 16 May 2012 13:54:54 +0000 (22:54 +0900)]
MERGE:skinnable-masterブランチのインストールスクリプトをマージ

5/16時点のlocale選択画面の実装を行ったブランチをマージ

11 years agoMERGE: リビジョン1849。startUpError()に渡す引数内でXHTMLタグを使用可能に
sakamocchi [Wed, 16 May 2012 12:35:45 +0000 (21:35 +0900)]
MERGE: リビジョン1849。startUpError()に渡す引数内でXHTMLタグを使用可能に

startUpError()は引数に対してEntity::hsc()を実行してXMLエンティティを変換していた。これは複数のエラーメッセージを出力するのに都合が悪い。エラーメッセージはユーザーからの入力に応じて動的に生成されるため脆弱性の問題が発生するが、コア側でコントロール可能なため、エンティティ変換を削除する。

CHANGE: remove Entity::hsc() from startUpError()
if $title and $msg include some XHTML tags, they are escaped by
Entity::hsc(). This is a bit inconvinient.
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1849

11 years agoMERGE: リビジョン1848。翻訳ファイルのメッセージにXHTMLタグを含めることを可能に
sakamocchi [Wed, 16 May 2012 12:28:39 +0000 (21:28 +0900)]
MERGE: リビジョン1848。翻訳ファイルのメッセージにXHTMLタグを含めることを可能に

<%text%>に定数を展開するBaseActions::parse_text()だが、定数に対してEntity::hsc()を適用しているため、定数内のXHTMLタグがエスケープされていた。これはメッセージを作成する際にやや都合が悪い。翻訳メッセージは動的に生成されるものではないため脆弱性につながる可能性は低いことから、これを削除する。

Revision 1848:
CHANGE: unuse Entity::hsc() in BaseActions::parse_text()
if translation file includes some XHTML tags, they are escaped by
Entity::hsc(). This is a bit inconvinient.
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1848

11 years agoMERGE: リビジョン1847。Blogクラスのコード整理。
sakamocchi [Sun, 13 May 2012 21:30:26 +0000 (06:30 +0900)]
MERGE: リビジョン1847。Blogクラスのコード整理。

11 years agoMERGE: リビジョン1846。Itemクラスのコード整理。
sakamocchi [Sun, 13 May 2012 11:32:02 +0000 (20:32 +0900)]
MERGE: リビジョン1846。Itemクラスのコード整理。

11 years agoMERGE: リビジョン1845。Commentsクラスのコード整理。
sakamocchi [Sun, 13 May 2012 11:30:34 +0000 (20:30 +0900)]
MERGE: リビジョン1845。Commentsクラスのコード整理。

11 years agoMERGE: リビジョン1844。Commentクラスのコード整理。
sakamocchi [Sun, 13 May 2012 11:29:46 +0000 (20:29 +0900)]
MERGE: リビジョン1844。Commentクラスのコード整理。

11 years agoMERGE: リビジョン1837。ロケールに関する翻訳メッセージの修正
sakamocchi [Sun, 13 May 2012 04:20:38 +0000 (13:20 +0900)]
MERGE: リビジョン1837。ロケールに関する翻訳メッセージの修正

_ERROR_NOSUCHLANGUAGE を _ERROR_NOSUCHLOCALEに
_SETTINGS_LANGUAGE を _SETTINGS_LOCALEに

「ロケール」と表示するよりは「言語」と表示したほうがユーザー視点ではわかりやすいため、メッセージの内容は変更していない。

Revision 1837:
CHANGE: some translation message related to locale

_ERROR_NOSUCHLANGUAGE to _ERROR_NOSUCHLOCALE
 _SETTINGS_LANGUAGE to _SETTINGS_LOCALE

http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1837

11 years agoコミット[9071f7512d9ca141c773ee120e4cb3a6929a959b]の修正
shizuki [Sat, 12 May 2012 12:15:10 +0000 (21:15 +0900)]
コミット[9071f7512d9ca141c773ee120e4cb3a6929a959b]の修正
if文の条件式の「=」が一つ足りていなかった

11 years agoFIX: i18n::substr()のバグ修正
sakamocchi [Sat, 12 May 2012 10:27:25 +0000 (19:27 +0900)]
FIX: i18n::substr()のバグ修正

self::$current_charsetを第4引数にわたさなければならないが、第3引数である$length引数0である場合があり、望む文字列が偉られなかった。

11 years agoFIX: スキン名を引数とするsetSkin()に対しグローバル変数$skinidを渡していたバグの修正
sakamocchi [Sat, 12 May 2012 07:09:18 +0000 (16:09 +0900)]
FIX: スキン名を引数とするsetSkin()に対しグローバル変数$skinidを渡していたバグの修正

11 years agoFIX:$template配列内の存在しないindex'javascript'を呼び出して発生している警告に対処
reine [Fri, 11 May 2012 12:32:19 +0000 (21:32 +0900)]
FIX:$template配列内の存在しないindex'javascript'を呼び出して発生している警告に対処

11 years agoFIX:クエリエラー時にエラーとなったクエリが画面に表示されない不具合の修正
reine [Fri, 11 May 2012 12:30:01 +0000 (21:30 +0900)]
FIX:クエリエラー時にエラーとなったクエリが画面に表示されない不具合の修正

11 years agoFIX:追加プラグインオプションヘッダの表示を修正
reine [Thu, 10 May 2012 15:21:39 +0000 (00:21 +0900)]
FIX:追加プラグインオプションヘッダの表示を修正

11 years agoCHANGE:ブックマークレットでのアイテム編集時、ヘッダにアイテムのタイトルが表示されるように変更
reine [Thu, 10 May 2012 15:20:44 +0000 (00:20 +0900)]
CHANGE:ブックマークレットでのアイテム編集時、ヘッダにアイテムのタイトルが表示されるように変更

11 years agoFIX:変数$multipleBlogsが初期化されていないために発生する警告に対処
reine [Thu, 10 May 2012 15:19:08 +0000 (00:19 +0900)]
FIX:変数$multipleBlogsが初期化されていないために発生する警告に対処

11 years agoCHANGE:クエリ生成時のdate関数をDB::formatDateTimeに変更
reine [Thu, 10 May 2012 13:47:27 +0000 (22:47 +0900)]
CHANGE:クエリ生成時のdate関数をDB::formatDateTimeに変更

11 years agoFIX: マージ漏れにより非ログイン時のロケールが適切に処理されていない不具合を修正
sakamocchi [Wed, 9 May 2012 15:38:17 +0000 (00:38 +0900)]
FIX: マージ漏れにより非ログイン時のロケールが適切に処理されていない不具合を修正

i18n::get_forced_locale()の返り値の評価に誤りがあった

11 years agoMERGE: リビジョン1834。globalfunctions.phpの非推奨関数の整理。
sakamocchi [Wed, 9 May 2012 15:19:59 +0000 (00:19 +0900)]
MERGE: リビジョン1834。globalfunctions.phpの非推奨関数の整理。

近年の開発により、リリース当初に作成されたグローバル関数のうち結構な数がクラスの機能として実装されたことを受けて、それらグローバル関数を非推奨とします。

Notificationクラスで同等機能を持つメソッドを提供:
 getMailFooter()
 isValidMailAddress()

Entityクラスで同等機能を持つメソッドを提供:
 highlight()
 shorten()
 stringStripTags ()
 toAscii()
 stringToAttribute()
 stringToXML()
 encode_desc()

i18nクラスで同等機能を持つメソッドを提供:
 getLanguageName()
 checkLanguage()
 formatDate()

DBクラスで同等機能を持つメソッドを提供:
 quickQuery()
 mysqldate()

Linkクラスで同等機能を持つメソッドを提供:
 createItemLink()
 createMemberLink()
 createCategoryLink()
 createArchiveListLink()
 createArchiveLink()
 createBlogidLink()
 createLink()
 createBlogLink()

ActionLogクラスで同等機能を持つメソッドを提供:
 addToLog()

Managerクラスで同等機能を持つメソッドを提供:
 getPluginNameFromPid()
 numberOfEventSubscriber()

意味のない関数:
 ifset()
 selectLanguage()
 ticketForPlugin()

Revision 1834:
CHANGE: rearrangement for globalfunctions.php and make some functions
deprecated

At current development,  much functions in global scope are obsoleted by
classes.

obsoleted by Notification class:
 getMailFooter()
 isValidMailAddress()

obsoleted by Entity class:
 highlight()
 shorten()
 stringStripTags ()
 toAscii()
 stringToAttribute()
 stringToXML()
 encode_desc()

obsoleted by i18n class:
 getLanguageName()
 checkLanguage()
 formatDate()

obsoleted by DB class:
 quickQuery()
 mysqldate()

obsoleted by Link class:
 createItemLink()
 createMemberLink()
 createCategoryLink()
 createArchiveListLink()
 createArchiveLink()
 createBlogidLink()
 createLink()
 createBlogLink()

obsoleted by ActionLog class:
 addToLog()

obsoleted by Manager class
 getPluginNameFromPid()
 numberOfEventSubscriber()

meaningless:
 ifset()
 selectLanguage()
 ticketForPlugin()

http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1834

11 years agoFIX:不足していた_SETTINGS_LOCALE定数を追加
reine [Tue, 8 May 2012 13:42:23 +0000 (22:42 +0900)]
FIX:不足していた_SETTINGS_LOCALE定数を追加

11 years agoADD: <%parsedinclude%>でスキン内でスペシャルスキンパーツを展開する機能を追加
sakamocchi [Sun, 6 May 2012 14:29:44 +0000 (23:29 +0900)]
ADD: <%parsedinclude%>でスキン内でスペシャルスキンパーツを展開する機能を追加

Nucleus CMS日本語版3.41から実装された同機能を実装。詳細は以下を参照のこと。
http://sourceforge.jp/projects/nucleus-jp/lists/archive/developers/2012-May/000944.html

11 years agoMerge branch 'master' of git.sourceforge.jp:/gitroot/nucleus-jp/nucleus-next
sakamocchi [Sun, 6 May 2012 14:00:46 +0000 (23:00 +0900)]
Merge branch 'master' of git.sourceforge.jp:/gitroot/nucleus-jp/nucleus-next

11 years agoMERGE: リビジョン1831。グローバル設定以外でプラグインオプションが翻訳されないバグの修正
sakamocchi [Sun, 6 May 2012 13:59:56 +0000 (22:59 +0900)]
MERGE: リビジョン1831。グローバル設定以外でプラグインオプションが翻訳されないバグの修正

Admin::action_pluginoptions()とAdmin::_insertPluginOptions()を見直し、showlist.phpのlistplug_plugOptionRow()にて適切に表示されるよう修正。特に後者は外部結合を用いてSQL文を書きなおした。

11 years agoMERGE: リビジョン1830。NucleusPlugin::get_option()において定義されていない変数の参照を修正
sakamocchi [Sun, 6 May 2012 13:55:25 +0000 (22:55 +0900)]
MERGE: リビジョン1830。NucleusPlugin::get_option()において定義されていない変数の参照を修正

$defvalが定義されていなかったために警告が発生し、またプラグインオプションのデフォルト値が適用されていなかったバグの修正

Revision 1830:
FIX: NucleusPlugin::get_option() refers to undefined variable.
$defVal is not defined.
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1830

11 years agoCHANGE:$CONF['debug']がTRUEの時にクエリエラーを画面に出力するように変更
reine [Sun, 6 May 2012 13:17:38 +0000 (22:17 +0900)]
CHANGE:$CONF['debug']がTRUEの時にクエリエラーを画面に出力するように変更

11 years agoMERGE: リビジョン1829。管理エリアのスタートアップエラー表示の際のHTTPヘッダ出力の修正
sakamocchi [Sun, 6 May 2012 04:00:36 +0000 (13:00 +0900)]
MERGE: リビジョン1829。管理エリアのスタートアップエラー表示の際のHTTPヘッダ出力の修正

/nucleus/index.phpからstartUpError()をコールする際、HTTP1.1ヘッダを2回生成していたバグの修正

11 years agoMERGE: リビジョン1828。リビジョン1827の補足。
sakamocchi [Sat, 5 May 2012 08:48:29 +0000 (17:48 +0900)]
MERGE: リビジョン1828。リビジョン1827の補足。

返り値やその評価を整理。

11 years agoMERGE: リビジョン1827。タグ<%locale%>と<%charset%>がどのコンテクストでも使用可能に
sakamocchi [Sat, 5 May 2012 04:04:40 +0000 (13:04 +0900)]
MERGE: リビジョン1827。タグ<%locale%>と<%charset%>がどのコンテクストでも使用可能に

BaseActions::parse_locale()とBaseActions::parse_charset()を追加。これによりActions::parse_charset()を削除した。

Revision 1827:
ADD: BaseActions::parse_locale() and BaseActions::parse_charset() and
remove Actions::parse_charset()
<%locale%> and <%charset%> is available for whole context.
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1827

11 years agoMERGE: リビジョン1826。プラグインイベント「ForceLocale」の新設。
sakamocchi [Sat, 5 May 2012 04:02:51 +0000 (13:02 +0900)]
MERGE: リビジョン1826。プラグインイベント「ForceLocale」の新設。

現在のロケールと文字符号化方式をプラグインから強制するためのイベントとして、ForceLocaleを新設した。これにより、従来はイベント「PreSendContentType」を利用して指定していたユーザーエージェント(ウェブブラウザー)への出力文字符号化方式は非推奨となる。

従来はプラグイン側でバッファリングして入出力文字列の文字符号化方式を変換していたが、イベント「ForceLocale」を用いることでNucleusCMSのコア側でこの変換を行う。すなわち、i18n::get_current_charset()で参照できる内部処理の既定の文字符号化方式と、i18n::get_forced_charset()で参照できるユーザーエージェントのための文字符号化方式の間の変換を自動で行うようになる。

イベント「PreSendContentType」を用いて携帯端末用に文字符号化方式を変換するようなプラグインは書き換えを推奨する。

イベント「ForceLocale」の仕様やプラグイン例のコードは、以下のコメントを参照して欲しい。

Revision 1826:
ADD: new plugin event 'ForceLocale' to force locale and character set
for output/input

With this commit, plugins can force Nucleus CMS to convert between its
default locale/character set and forced locale/character set.

Then these two compatibilities are lost:
1. The 'charset' argument of sendContentType() do nothing and
deprecated.
2. The 'charset' argument for plugin event 'PreSendContentType' is
removed. The Plugins to use this must be rewritted.

Specifications:
1. Forced locale should be within available locales under
/nucleus/locales.
2. Forced locale is ignored when member is logging-in.
3. Forced character set is used output/input conversion to/from user
agent with to i18n::get_forced_locale() and i18n::get_forced_charset().
4. On the other hand, Nucleus CMS consistently use
i18n::get_current_charset() for inner processing.
5. The conversion of character set from current to forced is done by
i18n::convert_handler() registerd with ob_start() in sendContentType().
6. The conversion of character set from forced to current is done by
i18n::convert_array() in globalfunctions.php

Plugin sample:
<?php
class NP_ForceLocale extends NucleusPlugin
{
public function getName()
{
return 'ForceLocale';
}
...
public function getEventList()
{
return array('ForceLocale');
}
...
public function event_ForceLocale($data)
{
/*
 * plugins decide which locale and charset to be forced here
 * then set them to $data.
 */
$data['locale'] = 'hu_Latn_HU';
$data['charset'] = 'ISO-8859-2';
return;
}
...
}

11 years agoMERGE: リビジョン1825。globalfunctions.phpのコード整理
sakamocchi [Sat, 5 May 2012 03:53:18 +0000 (12:53 +0900)]
MERGE: リビジョン1825。globalfunctions.phpのコード整理

初期化コードの序盤が多少追いやすくなるように前後を入れ替えるなどした。

11 years agoMERGE: リビジョン1821。Member::create()においてクエリ文を生成する際のバグを修正
sakamocchi [Fri, 4 May 2012 14:01:57 +0000 (23:01 +0900)]
MERGE: リビジョン1821。Member::create()においてクエリ文を生成する際のバグを修正

文字列のリテラルが引用符で囲まれていなかったために定数として処理されるバグの修正

Revision 1821:
FIX: a variable for string without quotation in Member::create()
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1821

11 years agoMERGE: リビジョン1820。PageFactory::parse_jsinput()のバグ修正
sakamocchi [Fri, 4 May 2012 14:00:11 +0000 (23:00 +0900)]
MERGE: リビジョン1820。PageFactory::parse_jsinput()のバグ修正

条件分岐が不適切でJavaScriptのコードの組み合わせがおかしい場合があるバグを修正

11 years agoMERGE: リビジョン1819。Blog:additem()で$isFutureが定義されていない旨の警告が出るのを修正
sakamocchi [Fri, 4 May 2012 13:58:31 +0000 (22:58 +0900)]
MERGE: リビジョン1819。Blog:additem()で$isFutureが定義されていない旨の警告が出るのを修正

FIX: minor bug in Blog::additem()
There is a case that $isFuture is unset.
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1819

11 years agoCHANGE:一部メソッドの動作がPDOStatementでの定義と異なっていたのを修正。
reine [Fri, 4 May 2012 03:38:47 +0000 (12:38 +0900)]
CHANGE:一部メソッドの動作がPDOStatementでの定義と異なっていたのを修正。
引数の初期化処理などを見直し。(リクエスト当たり2~3割ほど高速化?)

11 years agoFIX:NP_Text統合に伴いインストールプラグインから除外。
reine [Fri, 4 May 2012 03:23:12 +0000 (12:23 +0900)]
FIX:NP_Text統合に伴いインストールプラグインから除外。
FIX:クエリの文字列を二重にクォートしていた記述ミスを修正。
FIX:インストール前のファイルチェックでフォルダ名の修正漏れを訂正。

11 years agoCHANGE:DB::formatDateTime()が囲い文字を含む日付文字列を返すように変更。
reine [Thu, 3 May 2012 15:58:41 +0000 (00:58 +0900)]
CHANGE:DB::formatDateTime()が囲い文字を含む日付文字列を返すように変更。
それに伴う影響箇所の修正と、globalfunctions.phpのmysqldate()を非推奨とした。

FIX:Blog設定情報更新処理でクエリに不要なシングルクォーテーションが含まれていたために一部項目が正しく更新されていない不具合を修正

11 years agoMERGE: リビジョン1818。Parserクラスのコンストラクタを変更。BaseActions派生クラスのメソッド名を変更
sakamocchi [Thu, 3 May 2012 04:25:55 +0000 (13:25 +0900)]
MERGE: リビジョン1818。Parserクラスのコンストラクタを変更。BaseActions派生クラスのメソッド名を変更

Parser::__construct()でBaseActions派生クラスのsetParser()を実行し、自身を登録するように変更。これに伴い、Parserクラスのインスタンスを作成する処理が変更となった。

また、BaseActions派生クラスのメソッド名も以下のように変更した。
・getDefaultSkinTypes()をgetAvailableSkinTypes()に
・getDefinedActions()をgetAvailableActions()に

Revision 1818:
CHANGE: constructor of Parser class, method names of BaseActions-derived
classes

Now Parser class set itself into BaseActions-derived class as $parser
calling setParser() within its constructor.

And rename two methods of  BaseActions-derived class:
getDefaultSkinTypes() to getAvailableSkinTypes()
getDefinedActions() to getAvailableActions()
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1818

11 years agoMERGE: リビジョン1817。派生クラスからsetParser()メソッドを基底クラスであるBaseActionsに移動
sakamocchi [Thu, 3 May 2012 02:49:15 +0000 (11:49 +0900)]
MERGE: リビジョン1817。派生クラスからsetParser()メソッドを基底クラスであるBaseActionsに移動

BaseActions::parse_parsedinclude()はBaseActions::$parserを利用するが、いくつかの派生クラスではこれがセットされなかった。基底クラスに移動することで、どのクラスでも利用可能にする。

Revision 1817:
CHANGE: move setParser() method from BaseActions-derived class to
BaseActions
BaseActions::parse_phpinclude() need parser object but
PageFactory/BodyActions has no parser object. This commit allows all
BaseActions-derived class to utilize <%phpinclude%> tag.
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1817

11 years agoMERGE: リビジョン1816。Skinクラスのコード整理。
sakamocchi [Thu, 3 May 2012 01:50:07 +0000 (10:50 +0900)]
MERGE: リビジョン1816。Skinクラスのコード整理。

Revision 1815:
minor code change for Skin class
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1816

11 years agoFIX:ベンチマークのクエリ実行回数の値をDBクラスから取得するように修正
reine [Wed, 2 May 2012 17:04:19 +0000 (02:04 +0900)]
FIX:ベンチマークのクエリ実行回数の値をDBクラスから取得するように修正

11 years agoFIX:getContentFromDB()への書き換え漏れを修正
reine [Wed, 2 May 2012 16:47:18 +0000 (01:47 +0900)]
FIX:getContentFromDB()への書き換え漏れを修正

11 years agoMERGE: リビジョン1813。差分の反映。
sakamocchi [Wed, 2 May 2012 14:50:15 +0000 (23:50 +0900)]
MERGE: リビジョン1813。差分の反映。

コミット「bf353feef19665dcb79b4d8a5453546abe9391d0」で不十分だった箇所の修正。

Revision 1813:
MERGE: NP_Text is merged into core scripts
<%text%> tag can be now used in every skin and template context and
enable skin translation. If you want to apply your translation file, put
it into "locales" directory in each skin directory. Then Skin::parse()
try to include it according to i18n::get_current_locale() and
i18n::get_current_charset().
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1813

11 years agoFIX: CommentActions::parse_itemlink()がアイテム配列を参照するよう修正
sakamocchi [Tue, 1 May 2012 14:10:02 +0000 (23:10 +0900)]
FIX: CommentActions::parse_itemlink()がアイテム配列を参照するよう修正

CommentActions::parse_itemlink()は、ItemActionsクラスを経由してItem構造を参照するが、これまでオブジェクトとして扱っていたItem構造は、新しいデータベースハンドラーを導入したことで連想配列となっていたことによる。

11 years agoFIX: 前回のコミットの微修正
sakamocchi [Tue, 1 May 2012 12:32:49 +0000 (21:32 +0900)]
FIX: 前回のコミットの微修正

PDO::quote()は引用符付きの文字列を返すため、フォーマット文字列に引用符は不要だった。

11 years agoMERGE: データベースハンドラーを再設計したnewdbhandler-masterブランチをmasterにマージ。
sakamocchi [Tue, 1 May 2012 11:41:19 +0000 (20:41 +0900)]
MERGE: データベースハンドラーを再設計したnewdbhandler-masterブランチをmasterにマージ。

詳細は以下を参照のこと

[4.0の開発 - 19] データベースハンドラーの再設計
http://japan.nucleuscms.org/bb/viewtopic.php?p=27997

11 years agoFIX:addTicketToUrl()で不正なクエリ式を含むURLが生成される不具合の修正
reine [Tue, 1 May 2012 05:07:05 +0000 (14:07 +0900)]
FIX:addTicketToUrl()で不正なクエリ式を含むURLが生成される不具合の修正

一例として管理操作履歴の消去処理に失敗していた

11 years agoconvert,upgrades内のコードも含めてDBクラスを使用するコードに修正(未テスト)
reine [Tue, 1 May 2012 05:08:46 +0000 (14:08 +0900)]
convert,upgrades内のコードも含めてDBクラスを使用するコードに修正(未テスト)

11 years agoFIX:MysqlPDO::execute()の返り値の調整
reine [Tue, 1 May 2012 04:40:27 +0000 (13:40 +0900)]
FIX:MysqlPDO::execute()の返り値の調整

11 years agoFIX:addTicketToUrl()で不正なクエリ式を含むURLが生成される不具合の修正
reine [Tue, 1 May 2012 05:07:05 +0000 (14:07 +0900)]
FIX:addTicketToUrl()で不正なクエリ式を含むURLが生成される不具合の修正

一例として管理操作履歴の消去処理に失敗していた

11 years agoFIX:引数と関数内で使用している変数名の不一致によりスキン情報が取得できない不具合の修正
reine [Tue, 1 May 2012 04:42:52 +0000 (13:42 +0900)]
FIX:引数と関数内で使用している変数名の不一致によりスキン情報が取得できない不具合の修正

11 years agoMERGE: リビジョン1806。リビジョン1802の補足。
sakamocchi [Tue, 1 May 2012 00:55:56 +0000 (09:55 +0900)]
MERGE: リビジョン1806。リビジョン1802の補足。

$handlerへ書き換えるコミットの変更漏れの修正。

Revision 1806:
supplemental fix for revision 1802
forgetting to modify.
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1806

11 years agoMERGE: リビジョン1806。リビジョン1802の補足。
sakamocchi [Tue, 1 May 2012 00:55:56 +0000 (09:55 +0900)]
MERGE: リビジョン1806。リビジョン1802の補足。

$handlerへ書き換えるコミットの変更漏れの修正。

Revision 1806:
supplemental fix for revision 1802
forgetting to modify.
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1806

11 years agoMERGE: リビジョン1805。PageFactoryクラスの変更とAdminクラス、bookmarklet.phpの修正。
sakamocchi [Mon, 30 Apr 2012 13:41:42 +0000 (22:41 +0900)]
MERGE: リビジョン1805。PageFactoryクラスの変更とAdminクラス、bookmarklet.phpの修正。

PageFactoryクラスはBaseActionクラスの派生クラスにも関わらず、これまでスキンに相当する処理まで担っていた。開発のためのコード透過性を考慮し、スキンに相当する処理を呼び出し側であるAdminクラスとbookmarklet.phpに移し、不要メソッドを削除した。

Revision 1805:
CHANGE: rework for PageFactory class and bookmarklet.php.

PageFactory class is derived from BaseActions class but it includes much
codes related to Skin selection. It's not good for developer's
transparency. With this commit, Skin selection is moved to
bookmarklet.php or Admin class.

add:
PageFactory::setVariables()

remove:
PageFactory::createAddForm()
PageFactory::createEditForm()
PageFactory::createForm()

modify:
Admin::action_createitem()
Admin::action_itemedit()
bm_doShowForm() in bookmarklet.php
bm_doEditForm() in bookmarklet.php
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1805

11 years agoMERGE: リビジョン1804。リビジョン1796の補足。
sakamocchi [Mon, 30 Apr 2012 13:35:43 +0000 (22:35 +0900)]
MERGE: リビジョン1804。リビジョン1796の補足。

i18n::strpos()関連の修正をした際、コピペにより定義されてない変数名がコードに含まれてしまったバグの修正。

Revision 1804:
supplemental fix for revision 1796
in some part, the argument is undefined for i18n::strpos()
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1804

11 years agoMERGE: リビジョン1802。変数名の変更。
sakamocchi [Mon, 30 Apr 2012 13:33:01 +0000 (22:33 +0900)]
MERGE: リビジョン1802。変数名の変更。

BaseActionsクラスの派生クラスのインスタンスはこれまで$actionsとなっていたが、ページ要求変数である$actionと混同してしまうため、$handlerとした。そのため、このコミットにより動作が変わることはない。

Revision 1802:
minor change for variable name
using $handler instead of $actions for BaseActions-derived class.
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1802

11 years agoMERGE: リビジョン1801/1803。PageFactoryクラスの整備。
sakamocchi [Mon, 30 Apr 2012 13:30:10 +0000 (22:30 +0900)]
MERGE: リビジョン1801/1803。PageFactoryクラスの整備。

BaseActionクラスからの派生クラスっぽく形式を整備。

Revision 1801:
CHANGE: re-arrangement for PageFactory class

remove:
PageFactory::$allowed_types

add:
PageFactory::$default_skin_types
pageFactory::getDefaultSkinTypes()
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1801

Revision 1803:
supplemental fix for revision 1801

array_key_exists() should be used instead of in_array() to check types
in PageFactory::createAddForm() and PageFactory::createEditForm().

http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1803

11 years agoMERGE: リビジョン1800。Skinクラスの2メソッドの名前変更
sakamocchi [Mon, 30 Apr 2012 13:45:18 +0000 (22:45 +0900)]
MERGE: リビジョン1800。Skinクラスの2メソッドの名前変更

スキンの内容の取得先をデータベースとファイルから選択できるようにしているが、それをメソッド名に反映した。

Revision 1800:
CHANGE: rename two methods related to retrieve skin contents and related
modification

rename:
Skin::getContents() to Skin::getContentFromDB()
Skin::getFileConten() to
Skin::getContentFromFile()
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1800

11 years agoMERGE: リビジョン1799。bookmarklet.phpでnextactionが動作しないバグの修正
sakamocchi [Mon, 30 Apr 2012 13:20:35 +0000 (22:20 +0900)]
MERGE: リビジョン1799。bookmarklet.phpでnextactionが動作しないバグの修正

再ログインを促された場合、その時に要求したactionがnextactionに引き継がれず、常にアイテム追加となるバグの修正。

Revision 1799:
FIX: bookmarklet.php cannot keep previous action when
loginAndPassThrough().
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1799

11 years agoMERGE: リビジョン1805。PageFactoryクラスの変更とAdminクラス、bookmarklet.phpの修正。
sakamocchi [Mon, 30 Apr 2012 13:41:42 +0000 (22:41 +0900)]
MERGE: リビジョン1805。PageFactoryクラスの変更とAdminクラス、bookmarklet.phpの修正。

PageFactoryクラスはBaseActionクラスの派生クラスにも関わらず、これまでスキンに相当する処理まで担っていた。開発のためのコード透過性を考慮し、スキンに相当する処理を呼び出し側であるAdminクラスとbookmarklet.phpに移し、不要メソッドを削除した。

Revision 1805:
CHANGE: rework for PageFactory class and bookmarklet.php.

PageFactory class is derived from BaseActions class but it includes much
codes related to Skin selection. It's not good for developer's
transparency. With this commit, Skin selection is moved to
bookmarklet.php or Admin class.

add:
PageFactory::setVariables()

remove:
PageFactory::createAddForm()
PageFactory::createEditForm()
PageFactory::createForm()

modify:
Admin::action_createitem()
Admin::action_itemedit()
bm_doShowForm() in bookmarklet.php
bm_doEditForm() in bookmarklet.php
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1805

11 years agoMERGE: リビジョン1804。リビジョン1796の補足。
sakamocchi [Mon, 30 Apr 2012 13:35:43 +0000 (22:35 +0900)]
MERGE: リビジョン1804。リビジョン1796の補足。

i18n::strpos()関連の修正をした際、コピペにより定義されてない変数名がコードに含まれてしまったバグの修正。

Revision 1804:
supplemental fix for revision 1796
in some part, the argument is undefined for i18n::strpos()
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1804

11 years agoMERGE: リビジョン1802。変数名の変更。
sakamocchi [Mon, 30 Apr 2012 13:33:01 +0000 (22:33 +0900)]
MERGE: リビジョン1802。変数名の変更。

BaseActionsクラスの派生クラスのインスタンスはこれまで$actionsとなっていたが、ページ要求変数である$actionと混同してしまうため、$handlerとした。そのため、このコミットにより動作が変わることはない。

Revision 1802:
minor change for variable name
using $handler instead of $actions for BaseActions-derived class.
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1802

11 years agoMERGE: リビジョン1801/1803。PageFactoryクラスの整備。
sakamocchi [Mon, 30 Apr 2012 13:30:10 +0000 (22:30 +0900)]
MERGE: リビジョン1801/1803。PageFactoryクラスの整備。

BaseActionクラスからの派生クラスっぽく形式を整備。

Revision 1801:
CHANGE: re-arrangement for PageFactory class

remove:
PageFactory::$allowed_types

add:
PageFactory::$default_skin_types
pageFactory::getDefaultSkinTypes()
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1801

Revision 1803:
supplemental fix for revision 1801

array_key_exists() should be used instead of in_array() to check types
in PageFactory::createAddForm() and PageFactory::createEditForm().

http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1803

11 years agoMERGE: リビジョン1800。Skinクラスの2メソッドの名前変更
sakamocchi [Mon, 30 Apr 2012 13:24:45 +0000 (22:24 +0900)]
MERGE: リビジョン1800。Skinクラスの2メソッドの名前変更

スキンの内容の取得先をデータベースとファイルから選択できるようにしているが、それをメソッド名に反映した。

Revision 1800:
CHANGE: rename two methods related to retrieve skin contents and related
modification

rename:
Skin::getContents() to Skin::getContentFromDB()
Skin::getFileConten() to
Skin::getContentFromFile()
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1800

11 years agoMERGE: リビジョン1799。bookmarklet.phpでnextactionが動作しないバグの修正
sakamocchi [Mon, 30 Apr 2012 13:20:35 +0000 (22:20 +0900)]
MERGE: リビジョン1799。bookmarklet.phpでnextactionが動作しないバグの修正

再ログインを促された場合、その時に要求したactionがnextactionに引き継がれず、常にアイテム追加となるバグの修正。

Revision 1799:
FIX: bookmarklet.php cannot keep previous action when
loginAndPassThrough().
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1799

12 years agoRevert "FIX:ブックマークレットから読み込む際にJavascriptでescapeされたテキストがデコードされずに編集画面に表示される問題を修正"
sakamocchi [Sun, 29 Apr 2012 12:46:01 +0000 (21:46 +0900)]
Revert "FIX:ブックマークレットから読み込む際にJavascriptでescapeされたテキストがデコードされずに編集画面に表示される問題を修正"

This reverts commit 91ee92b11369f01c525aed6e088b2354cdc799bb.

12 years agoFIX: upgrade1.5.phpのパースエラーの修正。
sakamocchi [Sun, 29 Apr 2012 12:43:55 +0000 (21:43 +0900)]
FIX: upgrade1.5.phpのパースエラーの修正。

コミット f47027f07bbc6aba59f35c096f3d301b2475f59d で発生したパースエラーの修正

12 years agoMERGE: リビジョン1796。多言語化処理の観点からstrstr()をi18n::strpos()に変更
sakamocchi [Sun, 29 Apr 2012 05:13:08 +0000 (14:13 +0900)]
MERGE: リビジョン1796。多言語化処理の観点からstrstr()をi18n::strpos()に変更

Revision 1796:
CHANGE: strstr() to i18n::strpos()
For i18n.
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1796

12 years agoMERGE: リビジョン1796。多言語化処理の観点からstrstr()をi18n::strpos()に変更
sakamocchi [Sun, 29 Apr 2012 05:11:54 +0000 (14:11 +0900)]
MERGE: リビジョン1796。多言語化処理の観点からstrstr()をi18n::strpos()に変更

Revision 1796:
CHANGE: strstr() to i18n::strpos()
For i18n.
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1796

12 years agoMERGE: リビジョン1794。xmlhttprequest.jsのencodeURI()をencodeURIComponent()に変更
sakamocchi [Sun, 29 Apr 2012 05:09:22 +0000 (14:09 +0900)]
MERGE: リビジョン1794。xmlhttprequest.jsのencodeURI()をencodeURIComponent()に変更

encodeURI()はURIすべてをx-www-form-urlencodedでエンコードするためのものである。しかしこの箇所ではURIすべてをエンコードする必要がないため、encodeURIComponent()を用いるべきである。

Revision 1794:
CHANGE: replace encodeURI() to encodeURIComponent()
Autodraft implementation utilize encodeURI() to its part of request URI
but it should be encodeURIComponent().

参考:
Standard ECMA-262 (ECMAScript Language Specification 5th Edition)
http://www.ecma-international.org/publications/standards/Ecma-262.htm
15.1.3 URI Handling Function Properties
15.1.3.1 decodeURI(encodeedURI)
15.1.3.2 decodeURIComponent(encodedURIComponent)
15.1.3.3 encodeURI(uri)
15.1.3.4 encodeURIComponent(uriComponent)

Microsoft Developer Network
JavaScript Reference
decodeURI Function (JavaScript)
http://msdn.microsoft.com/en-us/library/ht8a077w(v=vs.94).aspx
decodeURIComponent Function (JavaScript)
http://msdn.microsoft.com/en-us/library/91b80x6x(v=vs.94).aspx
encodeURI Function (JavaScript)
http://msdn.microsoft.com/en-us/library/xh9be5xc(v=vs.94).aspx
encodeURIComponent Function (JavaScript)
http://msdn.microsoft.com/en-us/library/aeh9cef7(v=vs.94).aspx
escape Function (JavaScript)
http://msdn.microsoft.com/en-us/library/9yzah1fh(v=vs.94).aspx
unescape Function (JavaScript)
http://msdn.microsoft.com/en-us/library/dz4x90hk(v=vs.94).aspx

Mozilla Developer Network
JavaScript Reference
decodeURI
https://developer.mozilla.org/ja/JavaScript/Reference/Global_Objects/decodeURI
decodeURIComponent
https://developer.mozilla.org/ja/JavaScript/Reference/Global_Objects/decodeURIComponent
encodeURI
https://developer.mozilla.org/ja/JavaScript/Reference/Global_Objects/encodeURI
encodeURIComponent
https://developer.mozilla.org/ja/JavaScript/Reference/Global_Objects/encodeURIComponent
escape
https://developer.mozilla.org/ja/DOM/window.escape
unescape
https://developer.mozilla.org/ja/DOM/window.unescape

NOTE:
decodeURI/decodeURIComponent/encodeURI/encodeURIComponent are in
specification,
but escape/unescape is defferent for each vendor's implement.
For example, Microsoft defines it as one of Global Object
http://msdn.microsoft.com/en-us/library/52f50e9t(v=vs.94).aspx
But Mozilla define it as one of methods in DOM Window Object
https://developer.mozilla.org/ja/DOM/window

NOTE:
urldecode() already applied to each elements in
$_GET/$_POST/$_REQUEST/$_COOKIE
http://php.net/manual/en/function.urldecode.php
rawurldecode()
http://www.php.net/manual/en/function.rawurldecode.php
urlencode()
http://www.php.net/manual/en/function.rawurlencode.php
rawurldecode()
http://www.php.net/manual/en/function.urldecode.php

12 years agoMERGE: リビジョン1794。xmlhttprequest.jsのencodeURI()をencodeURIComponent()に変更
sakamocchi [Sun, 29 Apr 2012 05:09:22 +0000 (14:09 +0900)]
MERGE: リビジョン1794。xmlhttprequest.jsのencodeURI()をencodeURIComponent()に変更

encodeURI()はURIすべてをx-www-form-urlencodedでエンコードするためのものである。しかしこの箇所ではURIすべてをエンコードする必要がないため、encodeURIComponent()を用いるべきである。

Revision 1794:
CHANGE: replace encodeURI() to encodeURIComponent()
Autodraft implementation utilize encodeURI() to its part of request URI
but it should be encodeURIComponent().

参考:
Standard ECMA-262 (ECMAScript Language Specification 5th Edition)
http://www.ecma-international.org/publications/standards/Ecma-262.htm
15.1.3 URI Handling Function Properties
15.1.3.1 decodeURI(encodeedURI)
15.1.3.2 decodeURIComponent(encodedURIComponent)
15.1.3.3 encodeURI(uri)
15.1.3.4 encodeURIComponent(uriComponent)

Microsoft Developer Network
JavaScript Reference
decodeURI Function (JavaScript)
http://msdn.microsoft.com/en-us/library/ht8a077w(v=vs.94).aspx
decodeURIComponent Function (JavaScript)
http://msdn.microsoft.com/en-us/library/91b80x6x(v=vs.94).aspx
encodeURI Function (JavaScript)
http://msdn.microsoft.com/en-us/library/xh9be5xc(v=vs.94).aspx
encodeURIComponent Function (JavaScript)
http://msdn.microsoft.com/en-us/library/aeh9cef7(v=vs.94).aspx
escape Function (JavaScript)
http://msdn.microsoft.com/en-us/library/9yzah1fh(v=vs.94).aspx
unescape Function (JavaScript)
http://msdn.microsoft.com/en-us/library/dz4x90hk(v=vs.94).aspx

Mozilla Developer Network
JavaScript Reference
decodeURI
https://developer.mozilla.org/ja/JavaScript/Reference/Global_Objects/decodeURI
decodeURIComponent
https://developer.mozilla.org/ja/JavaScript/Reference/Global_Objects/decodeURIComponent
encodeURI
https://developer.mozilla.org/ja/JavaScript/Reference/Global_Objects/encodeURI
encodeURIComponent
https://developer.mozilla.org/ja/JavaScript/Reference/Global_Objects/encodeURIComponent
escape
https://developer.mozilla.org/ja/DOM/window.escape
unescape
https://developer.mozilla.org/ja/DOM/window.unescape

NOTE:
decodeURI/decodeURIComponent/encodeURI/encodeURIComponent are in
specification,
but escape/unescape is defferent for each vendor's implement.
For example, Microsoft defines it as one of Global Object
http://msdn.microsoft.com/en-us/library/52f50e9t(v=vs.94).aspx
But Mozilla define it as one of methods in DOM Window Object
https://developer.mozilla.org/ja/DOM/window

NOTE:
urldecode() already applied to each elements in
$_GET/$_POST/$_REQUEST/$_COOKIE
http://php.net/manual/en/function.urldecode.php
rawurldecode()
http://www.php.net/manual/en/function.rawurldecode.php
urlencode()
http://www.php.net/manual/en/function.rawurlencode.php
rawurldecode()
http://www.php.net/manual/en/function.urldecode.php

12 years agoMERGE: リビジョン1792。Windowsオペレーティングシステムのレジストリを書き換える機能を廃止
sakamocchi [Sun, 29 Apr 2012 05:00:38 +0000 (14:00 +0900)]
MERGE: リビジョン1792。Windowsオペレーティングシステムのレジストリを書き換える機能を廃止

これまで、Microsoft社のWindowsオペレーティングシステムの内部設定を司るレジストリを書き換え、デスクトップ環境の右クリックメニューにNucleusCMSのブックマークレットへのショートカットを追加する機能を提供していた。セキュリティとコードメンテナンスの観点から、これを廃止する。

Revision 1792:
REMOVE: bookmarklet registering to Windows operating system
This function heavily depends on Windows operating system and hard to
maintain for us. There is no alternatives after this commit.
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1792

12 years agoMERGE: リビジョン1792。Windowsオペレーティングシステムのレジストリを書き換える機能を廃止
sakamocchi [Sun, 29 Apr 2012 05:00:38 +0000 (14:00 +0900)]
MERGE: リビジョン1792。Windowsオペレーティングシステムのレジストリを書き換える機能を廃止

これまで、Microsoft社のWindowsオペレーティングシステムの内部設定を司るレジストリを書き換え、デスクトップ環境の右クリックメニューにNucleusCMSのブックマークレットへのショートカットを追加する機能を提供していた。セキュリティとコードメンテナンスの観点から、これを廃止する。

Revision 1792:
REMOVE: bookmarklet registering to Windows operating system
This function heavily depends on Windows operating system and hard to
maintain for us. There is no alternatives after this commit.
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1792

12 years agoMERGE: リビジョン1792の一部。getBookmarklet()の変更。
sakamocchi [Sun, 29 Apr 2012 04:54:57 +0000 (13:54 +0900)]
MERGE: リビジョン1792の一部。getBookmarklet()の変更。

getBookmarklet()で返されるJavaScriptのコード中で、文字列をx-www-urlencodedに従ってエンコードする目的でescape()を使っていた。しかしこれは、JavaScriptの言語仕様であるStandard
ECMA Script-262に定義されているencodeURIComponent()でエンコードされるべきものである。

これにより、コミットf29dc242d5f30a1394ad4174e7c87e12076e9fc2で指摘されたバグを修正する。

Revision 1792:
REMOVE: bookmarklet registering to Windows operating system
This function heavily depends on Windows operating system and hard to
maintain for us. There is no alternatives after this commit.
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1792

Standard ECMA-262 (ECMAScript Language Specification 5th Edition)
http://www.ecma-international.org/publications/standards/Ecma-262.htm
15.1.3 URI Handling Function Properties
15.1.3.1 decodeURI(encodeedURI)
15.1.3.2 decodeURIComponent(encodedURIComponent)
15.1.3.3 encodeURI(uri)
15.1.3.4 encodeURIComponent(uriComponent)

Microsoft Developer Network
JavaScript Reference
decodeURI Function (JavaScript)
http://msdn.microsoft.com/en-us/library/ht8a077w(v=vs.94).aspx
decodeURIComponent Function (JavaScript)
http://msdn.microsoft.com/en-us/library/91b80x6x(v=vs.94).aspx
encodeURI Function (JavaScript)
http://msdn.microsoft.com/en-us/library/xh9be5xc(v=vs.94).aspx
encodeURIComponent Function (JavaScript)
http://msdn.microsoft.com/en-us/library/aeh9cef7(v=vs.94).aspx
escape Function (JavaScript)
http://msdn.microsoft.com/en-us/library/9yzah1fh(v=vs.94).aspx
unescape Function (JavaScript)
http://msdn.microsoft.com/en-us/library/dz4x90hk(v=vs.94).aspx

Mozilla Developer Network
JavaScript Reference
decodeURI
https://developer.mozilla.org/ja/JavaScript/Reference/Global_Objects/decodeURI
decodeURIComponent
https://developer.mozilla.org/ja/JavaScript/Reference/Global_Objects/decodeURIComponent
encodeURI
https://developer.mozilla.org/ja/JavaScript/Reference/Global_Objects/encodeURI
encodeURIComponent
https://developer.mozilla.org/ja/JavaScript/Reference/Global_Objects/encodeURIComponent
escape
https://developer.mozilla.org/ja/DOM/window.escape
unescape
https://developer.mozilla.org/ja/DOM/window.unescape

NOTE:
decodeURI/decodeURIComponent/encodeURI/encodeURIComponent are in
specification,
but escape/unescape is defferent for each vendor's implement.
For example, Microsoft defines it as one of Global Object
http://msdn.microsoft.com/en-us/library/52f50e9t(v=vs.94).aspx
But Mozilla define it as one of methods in DOM Window Object
https://developer.mozilla.org/ja/DOM/window

NOTE:
urldecode() already applied to each elements in
$_GET/$_POST/$_REQUEST/$_COOKIE
http://php.net/manual/en/function.urldecode.php
rawurldecode()
http://www.php.net/manual/en/function.rawurldecode.php
urlencode()
http://www.php.net/manual/en/function.rawurlencode.php
rawurldecode()
http://www.php.net/manual/en/function.urldecode.php

12 years agoMERGE: リビジョン1792の一部。getBookmarklet()の変更。
sakamocchi [Sun, 29 Apr 2012 04:54:57 +0000 (13:54 +0900)]
MERGE: リビジョン1792の一部。getBookmarklet()の変更。

getBookmarklet()で返されるJavaScriptのコード中で、文字列をx-www-urlencodedに従ってエンコードする目的でescape()を使っていた。しかしこれは、JavaScriptの言語仕様であるStandard
ECMA Script-262に定義されているencodeURIComponent()でエンコードされるべきものである。

これにより、コミットf29dc242d5f30a1394ad4174e7c87e12076e9fc2で指摘されたバグを修正する。

Revision 1792:
REMOVE: bookmarklet registering to Windows operating system
This function heavily depends on Windows operating system and hard to
maintain for us. There is no alternatives after this commit.
http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1792

Standard ECMA-262 (ECMAScript Language Specification 5th Edition)
http://www.ecma-international.org/publications/standards/Ecma-262.htm
15.1.3 URI Handling Function Properties
15.1.3.1 decodeURI(encodeedURI)
15.1.3.2 decodeURIComponent(encodedURIComponent)
15.1.3.3 encodeURI(uri)
15.1.3.4 encodeURIComponent(uriComponent)

Microsoft Developer Network
JavaScript Reference
decodeURI Function (JavaScript)
http://msdn.microsoft.com/en-us/library/ht8a077w(v=vs.94).aspx
decodeURIComponent Function (JavaScript)
http://msdn.microsoft.com/en-us/library/91b80x6x(v=vs.94).aspx
encodeURI Function (JavaScript)
http://msdn.microsoft.com/en-us/library/xh9be5xc(v=vs.94).aspx
encodeURIComponent Function (JavaScript)
http://msdn.microsoft.com/en-us/library/aeh9cef7(v=vs.94).aspx
escape Function (JavaScript)
http://msdn.microsoft.com/en-us/library/9yzah1fh(v=vs.94).aspx
unescape Function (JavaScript)
http://msdn.microsoft.com/en-us/library/dz4x90hk(v=vs.94).aspx

Mozilla Developer Network
JavaScript Reference
decodeURI
https://developer.mozilla.org/ja/JavaScript/Reference/Global_Objects/decodeURI
decodeURIComponent
https://developer.mozilla.org/ja/JavaScript/Reference/Global_Objects/decodeURIComponent
encodeURI
https://developer.mozilla.org/ja/JavaScript/Reference/Global_Objects/encodeURI
encodeURIComponent
https://developer.mozilla.org/ja/JavaScript/Reference/Global_Objects/encodeURIComponent
escape
https://developer.mozilla.org/ja/DOM/window.escape
unescape
https://developer.mozilla.org/ja/DOM/window.unescape

NOTE:
decodeURI/decodeURIComponent/encodeURI/encodeURIComponent are in
specification,
but escape/unescape is defferent for each vendor's implement.
For example, Microsoft defines it as one of Global Object
http://msdn.microsoft.com/en-us/library/52f50e9t(v=vs.94).aspx
But Mozilla define it as one of methods in DOM Window Object
https://developer.mozilla.org/ja/DOM/window

NOTE:
urldecode() already applied to each elements in
$_GET/$_POST/$_REQUEST/$_COOKIE
http://php.net/manual/en/function.urldecode.php
rawurldecode()
http://www.php.net/manual/en/function.rawurldecode.php
urlencode()
http://www.php.net/manual/en/function.rawurlencode.php
rawurldecode()
http://www.php.net/manual/en/function.urldecode.php

12 years agoRevert "FIX:ブックマークレットから読み込む際にJavascriptでescapeされたテキストがデコードされずに編集画面に表示される問題を修正"
sakamocchi [Sun, 29 Apr 2012 04:46:07 +0000 (13:46 +0900)]
Revert "FIX:ブックマークレットから読み込む際にJavascriptでescapeされたテキストがデコードされずに編集画面に表示される問題を修正"

This reverts commit f29dc242d5f30a1394ad4174e7c87e12076e9fc2.

12 years agoFIX:呼び出し関数名の記述ミスにより、メディアのアップロードが失敗する不具合を修正
reine [Sat, 28 Apr 2012 16:43:43 +0000 (01:43 +0900)]
FIX:呼び出し関数名の記述ミスにより、メディアのアップロードが失敗する不具合を修正
他、1箇所の同記述ミスもあわせて修正

12 years agoFIX:呼び出し関数名の記述ミスにより、メディアのアップロードが失敗する不具合を修正
reine [Sat, 28 Apr 2012 16:43:43 +0000 (01:43 +0900)]
FIX:呼び出し関数名の記述ミスにより、メディアのアップロードが失敗する不具合を修正
他、1箇所の同記述ミスもあわせて修正

12 years agoアイテム編集画面のJavaScriptボタンバーのマークアップとCSSの追加修正
reine [Sat, 28 Apr 2012 16:25:02 +0000 (01:25 +0900)]
アイテム編集画面のJavaScriptボタンバーのマークアップとCSSの追加修正

12 years agoMERGE: リビジョン1791。Blog/CommentActionsクラスの差分のマージ
sakamocchi [Sat, 28 Apr 2012 05:48:16 +0000 (14:48 +0900)]
MERGE: リビジョン1791。Blog/CommentActionsクラスの差分のマージ

以下の2つのコミットを上流に反映した際の差分のマージ。
commit: f51cf34038f7394f469ef0c2d2fc8c6eec89f47f
commit: 4c5e7bd7ef24aadd49c80f8755d3914c0d32d6e0

Revision 1791:
fix minor bugs in Blog and CommentActions class

Blog::addTeamMember()
CommentActions::parse_time()

12 years agoMERGE: リビジョン1791。Blog/CommentActionsクラスの差分のマージ
sakamocchi [Sat, 28 Apr 2012 05:46:12 +0000 (14:46 +0900)]
MERGE: リビジョン1791。Blog/CommentActionsクラスの差分のマージ

以下の2つのコミットを上流に反映した際の差分のマージ。
commit: f51cf34038f7394f469ef0c2d2fc8c6eec89f47f
commit: 4c5e7bd7ef24aadd49c80f8755d3914c0d32d6e0

Revision 1791:
fix minor bugs in Blog and CommentActions class

Blog::addTeamMember()
CommentActions::parse_time()

12 years ago前回でコミットした修正中のコメントを訂正
sakamocchi [Sat, 28 Apr 2012 05:19:47 +0000 (14:19 +0900)]
前回でコミットした修正中のコメントを訂正

12 years ago前回でコミットした修正中のコメントを訂正
sakamocchi [Sat, 28 Apr 2012 05:19:47 +0000 (14:19 +0900)]
前回でコミットした修正中のコメントを訂正