From 78208b12c6340e70bfa7bacd3a24df2908c10591 Mon Sep 17 00:00:00 2001 From: ohga Date: Tue, 29 Jul 2014 17:33:46 +0900 Subject: [PATCH 01/65] =?UTF-8?q?action=5Fname=E3=81=AE=E5=BD=A2=E5=BC=8F?= =?UTF-8?q?=E3=81=AB=E3=82=88=E3=81=A3=E3=81=A6=E3=81=AFNotice=E3=81=8C?= =?UTF-8?q?=E7=99=BA=E7=94=9F=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/webapp/components/authcheck/Main.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/webapp/components/authcheck/Main.class.php b/html/webapp/components/authcheck/Main.class.php index 6f6643c..ced6aea 100644 --- a/html/webapp/components/authcheck/Main.class.php +++ b/html/webapp/components/authcheck/Main.class.php @@ -349,7 +349,7 @@ function AuthCheck($action_name, $page_id, $block_id) { $isMobileAction = ($pathList[0] == 'common' && $pathList[1] == 'mobile'); $isMobileAction = ($isMobileAction - || $pathList[2] == 'mobile'); + || isset($pathList[2]) && $pathList[2] == 'mobile'); if ($isMobileAction && empty($mobile_flag)) { return false; From 608d3516d1c37ca25604b8051c5d03fb1df96371 Mon Sep 17 00:00:00 2001 From: Rika Fujiwara Date: Wed, 24 Sep 2014 15:39:58 +0900 Subject: [PATCH 02/65] =?UTF-8?q?IE7=20=E3=81=AE=E3=81=A8=E3=81=8D?= =?UTF-8?q?=E3=80=81=E3=83=97=E3=83=AB=E3=83=80=E3=82=A6=E3=83=B3=E3=83=A1?= =?UTF-8?q?=E3=83=8B=E3=83=A5=E3=83=BC=E3=83=86=E3=83=B3=E3=83=97=E3=83=AC?= =?UTF-8?q?=E3=83=BC=E3=83=88=E3=81=AE=E3=82=82=E3=81=AE=E3=82=92=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E3=81=97=E3=81=A6=E3=81=84=E3=82=8B=E3=81=A8JS?= =?UTF-8?q?=E3=82=A8=E3=83=A9=E3=83=BC=E3=81=8C=E7=99=BA=E7=94=9F=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=81=93=E3=81=A8=E3=81=B8=E3=81=AE=E5=AF=BE=E5=BF=9C?= =?UTF-8?q?=20#113?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issueにも記載しておりますが、原因は未ログイン時、隠されているログインPOPUP画面で仕込まれている強制的なfocusイベントとblurイベントの発火が jQueryロードのタイミングと合わさった時のprototype.js と jQueryとの競合です。 回避するために、以下の実装を行いました。 1.ページのloadイベントを待ってのjQueryロードを行うようにした 2.IE9未満の場合に限り、400ms JQUERYのロードを待つように変更 3.jQueryロード中はメニューを操作不可能にして、別ページへの切り替えが行えないように変更 これでも完全ではありません。JQロードは動的に行われているので他のイベント処理を完全に防ぐことは不可能です。 ただ、上記の実装追加で競合の発生の可能性は大変低くなっています。 IE7,IE8のユーザーからは、メニュー操作ができるようになるまで一瞬の間が生じることになります。 対策としては「待ちタイマ値」の400msをもう少し短くすることですが、こちらの試験では、ここの値を小さくすると エラーが発生する確率が増えました。 --- html/webapp/modules/menu/files/js/menu.js | 79 +++++++++++++++++++ .../menu_view_main_init.html | 36 +-------- .../menu_view_main_init.html | 36 +-------- .../menu_view_main_init.html | 36 +-------- .../menu_view_main_init.html | 39 +-------- .../menu_view_main_init.html | 39 +-------- 6 files changed, 86 insertions(+), 179 deletions(-) diff --git a/html/webapp/modules/menu/files/js/menu.js b/html/webapp/modules/menu/files/js/menu.js index c75dec5..4cfb421 100644 --- a/html/webapp/modules/menu/files/js/menu.js +++ b/html/webapp/modules/menu/files/js/menu.js @@ -860,5 +860,84 @@ clsMenu.prototype = { } }.bind(this); commonCls.send(chg_params); + }, + // 未ログインのとき + // ログインinputのフォーカス&フォーカス外しの初期処理で + // onfocus & onblurのイベントが走る + // このイベント処理とJQロードのタイミングがちょうどかち合うとJSエラーが発生する + // このため、IE & < 9 & 未ログインのときに限り、JSロードを400MS待たせ、かつロード中はページ切り替え動作をキャンセルするよう + menuJqLoad: function(block_id, color) { + var jqload_func = this._menuJqLoad; + var cancel_func = this._menuCancelForJqload; + + // IEかつ未ログインだったら + if($('login_id_0') && browser.isIE && browser.version < 9) { + var els = Element.getElementsByClassName(this.id, "menu_jq_gnavi_pldwn_" + color + "_btn"); + els.each( + function(el){ + el.observe("click", cancel_func); + } + ); + + setTimeout(function(){ + jqload_func(block_id, color); + }, 400); + } + else { + jqload_func(block_id, color); + } + }, + _menuCancelForJqload : function(e) { + jcheck = new Function('return !(typeof jQuery !== "undefined" && window.$ === jQuery)'); + commonCls.wait(jcheck); + return false; + }, + _menuJqLoad : function(block_id, color) { + + var cancel_func = this._menuCancelForJqload; + + jqcheckCls.jqload("jquery-1.6.4.min", "window.jQuery", + function() { + var zindex = 900; + if(browser.isIE && browser.version <= 7) { + jQuery("#" + block_id + " ul.menu_jq_gnavi_pldwn_" + color + " > li").each(function(index,el) { + jQuery(el).attr("style","z-index:"+zindex); + zindex--; + }); + } + if(browser.isIE && browser.version < 7) { + jQuery("#" + block_id + " ul.menu_jq_gnavi_pldwn_" + color + " li").hover( + function() { jQuery(">a", this).addClass("menu_jq_gnavi_pldwn_" + color + "_actives"); jQuery(">ul.menu_jq_gnavi_pldwn_" + color + "_sub:not(:animated)", this).show(); }, + function() { jQuery(">a", this).removeClass("menu_jq_gnavi_pldwn_" + color + "_actives"); jQuery(">ul.menu_jq_gnavi_pldwn_" + color + "_sub", this).hide(); } + ); + } + else { + jQuery("#" + block_id + " ul.menu_jq_gnavi_pldwn_" + color + " li").hover( + function() { + jQuery(">a", this).addClass("menu_jq_gnavi_pldwn_" + color + "_actives"); + if(jQuery(this).closest("ul").hasClass("menu_jq_gnavi_pldwn_" + color + "_sub")) { + /*!browser.isIE && browser.version > 7 first view */ + if(jQuery(">ul.menu_jq_gnavi_pldwn_" + color + "_sub", this).css("left")=="0px" || jQuery(">ul.menu_jq_gnavi_pldwn_" + color + "_sub", this).css("left") == "auto"){ + jQuery(">ul.menu_jq_gnavi_pldwn_" + color + "_sub", this).css("left", jQuery(this).width()); + } + } + jQuery(">ul.menu_jq_gnavi_pldwn_" + color + "_sub:not(:animated)", this).slideDown("fast"); + }, + function() { + jQuery(">a", this).removeClass("menu_jq_gnavi_pldwn_" + color + "_actives"); + jQuery(">ul.menu_jq_gnavi_pldwn_" + color + "_sub", this).slideUp("fast"); + } + ); + } + if($('login_id_0') && browser.isIE && browser.version < 9) { + Element.getElementsByClassName(this.id, "menu_jq_gnavi_pldwn_" + color + "_btn").each( + function(el){ + el.stopObserving("click", cancel_func); + } + ); + } + + } + ); } } \ No newline at end of file diff --git a/html/webapp/modules/menu/templates/jq_gnavi_pldwn_blue/menu_view_main_init.html b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_blue/menu_view_main_init.html index 2a547e3..f35764d 100644 --- a/html/webapp/modules/menu/templates/jq_gnavi_pldwn_blue/menu_view_main_init.html +++ b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_blue/menu_view_main_init.html @@ -11,40 +11,6 @@ <{include file="../menu_script.html"}> <{/strip}> diff --git a/html/webapp/modules/menu/templates/jq_gnavi_pldwn_gray/menu_view_main_init.html b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_gray/menu_view_main_init.html index cde7810..862a988 100644 --- a/html/webapp/modules/menu/templates/jq_gnavi_pldwn_gray/menu_view_main_init.html +++ b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_gray/menu_view_main_init.html @@ -11,40 +11,6 @@ <{include file="../menu_script.html"}> <{/strip}> diff --git a/html/webapp/modules/menu/templates/jq_gnavi_pldwn_green/menu_view_main_init.html b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_green/menu_view_main_init.html index 91e4476..33eb078 100644 --- a/html/webapp/modules/menu/templates/jq_gnavi_pldwn_green/menu_view_main_init.html +++ b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_green/menu_view_main_init.html @@ -11,40 +11,6 @@ <{include file="../menu_script.html"}> <{/strip}> diff --git a/html/webapp/modules/menu/templates/jq_gnavi_pldwn_orange/menu_view_main_init.html b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_orange/menu_view_main_init.html index f8522ef..7a1bacc 100644 --- a/html/webapp/modules/menu/templates/jq_gnavi_pldwn_orange/menu_view_main_init.html +++ b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_orange/menu_view_main_init.html @@ -11,40 +11,5 @@ <{include file="../menu_script.html"}> -<{/strip}> + Event.observe(window, "load", function() { menuCls['<{$id}>'].menuJqLoad("<{$id}>", "orange"); }, true); +<{/strip}> diff --git a/html/webapp/modules/menu/templates/jq_gnavi_pldwn_red/menu_view_main_init.html b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_red/menu_view_main_init.html index 5659bc1..c04356c 100644 --- a/html/webapp/modules/menu/templates/jq_gnavi_pldwn_red/menu_view_main_init.html +++ b/html/webapp/modules/menu/templates/jq_gnavi_pldwn_red/menu_view_main_init.html @@ -11,40 +11,5 @@ <{include file="../menu_script.html"}> -<{/strip}> + Event.observe(window, "load", function() { menuCls['<{$id}>'].menuJqLoad("<{$id}>", "red"); }, true); +<{/strip}> From 3ccb47744f42c6f34f7a0bd22728838069363036 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=AA=E3=83=BC=E3=83=97=E3=83=B3=E3=82=BD=E3=83=BC?= =?UTF-8?q?=E3=82=B9=E3=83=BB=E3=83=AF=E3=83=BC=E3=82=AF=E3=82=B7=E3=83=A7?= =?UTF-8?q?=E3=83=83=E3=83=97=20=E6=B0=B8=E5=8E=9F=20=E7=AF=A4?= Date: Thu, 25 Sep 2014 15:13:23 +0900 Subject: [PATCH 03/65] =?UTF-8?q?=E3=83=AA=E3=82=B9=E3=83=88=E3=82=A2?= =?UTF-8?q?=E6=99=82=E3=80=81=E3=83=A1=E3=83=A2=E3=83=AA=E3=82=92=E7=AF=80?= =?UTF-8?q?=E7=B4=84=E3=81=99=E3=82=8B=E3=81=9F=E3=82=81=E3=81=AE=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=E3=82=92=E8=A1=8C=E3=81=A3=E3=81=9F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/webapp/modules/backup/components/Restore.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/html/webapp/modules/backup/components/Restore.class.php b/html/webapp/modules/backup/components/Restore.class.php index ed18790..bd5e1c8 100644 --- a/html/webapp/modules/backup/components/Restore.class.php +++ b/html/webapp/modules/backup/components/Restore.class.php @@ -214,7 +214,11 @@ function getRestoreArray($upload_id, $backup_page_id, $module_id, $temporary_fil //$options = array ('parseAttributes' => true); 属性値を含める //$unserializer =& new XML_Unserializer($options); - $result = $unserializer->unserialize($xml); + // XML を読み込んだ変数から処理すると、環境によってはメモリを使いすぎてエラーになるケースがあった。 + // そのため、XML は再度、ファイルから取得するように修正し、メモリの消費を抑えた。 + // 2014-08-15 by nagahara@opensource-workshop.jp + // $result = $unserializer->unserialize($xml); + $result = $unserializer->unserialize($temporary_file_path.BACKUP_ROOM_XML_FILE_NAME, true); if($result !== true) { $this->_fileAction->delDir($temporary_file_path); $errorList->add("backup", BACKUP_FAILURE_UNSERIALIZE); From 820871414ba861a3496fd5263cf8408a0a328c46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=AA=E3=83=BC=E3=83=97=E3=83=B3=E3=82=BD=E3=83=BC?= =?UTF-8?q?=E3=82=B9=E3=83=BB=E3=83=AF=E3=83=BC=E3=82=AF=E3=82=B7=E3=83=A7?= =?UTF-8?q?=E3=83=83=E3=83=97=20=E6=B0=B8=E5=8E=9F=20=E7=AF=A4?= Date: Thu, 25 Sep 2014 15:59:08 +0900 Subject: [PATCH 04/65] =?UTF-8?q?=E3=83=A1=E3=83=BC=E3=83=AB=E3=82=A2?= =?UTF-8?q?=E3=83=89=E3=83=AC=E3=82=B9=E6=AC=84=E3=81=8C=E8=A4=87=E6=95=B0?= =?UTF-8?q?=E3=81=82=E3=82=8B=E5=A0=B4=E5=90=88=E3=81=AE=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/registration/action/main/mail/Mail.class.php | 8 +++++++- .../webapp/modules/registration/components/View.class.php | 4 +++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/html/webapp/modules/registration/action/main/mail/Mail.class.php b/html/webapp/modules/registration/action/main/mail/Mail.class.php index a08ba2e..b4086be 100644 --- a/html/webapp/modules/registration/action/main/mail/Mail.class.php +++ b/html/webapp/modules/registration/action/main/mail/Mail.class.php @@ -61,7 +61,13 @@ function execute() $users = array(); if ($mail['regist_user_send'] && !empty($mail['regist_user_email'])) { - $users[]['email'] = $mail['regist_user_email']; + + // メールアドレス欄が複数ある場合の対応 by nagahara@opensource-workshop.jp + // $users[]['email'] = $mail['regist_user_email']; + foreach( $mail['regist_user_email'] as $mail_item ) { + $users[]['email'] = $mail_item; + } + $this->mailMain->setToUsers($users); $this->mailMain->send(); } diff --git a/html/webapp/modules/registration/components/View.class.php b/html/webapp/modules/registration/components/View.class.php index a87dd72..efffefc 100644 --- a/html/webapp/modules/registration/components/View.class.php +++ b/html/webapp/modules/registration/components/View.class.php @@ -741,7 +741,9 @@ function &_makeMail(&$recordSet) } if ($item['item_type'] == REGISTRATION_TYPE_EMAIL) { - $mail['regist_user_email'] = $row[$key]; + // メールアドレス欄が複数ある場合の対応 by nagahara@opensource-workshop.jp + // $mail['regist_user_email'] = $row[$key]; + $mail['regist_user_email'][] = $row[$key]; } $mail["data"] .= sprintf($dataFormat, htmlspecialchars($item["item_name"]), $value); From f44542db655da6f5405dfad4bd17efc4a15b6c5a Mon Sep 17 00:00:00 2001 From: ohga Date: Fri, 13 Feb 2015 10:55:54 +0900 Subject: [PATCH 05/65] =?UTF-8?q?php5.4=E4=BB=A5=E4=B8=8A=E3=81=AE?= =?UTF-8?q?=E7=92=B0=E5=A2=83=E3=81=A7=E7=94=BB=E9=9D=A2=E4=B8=8A=E9=83=A8?= =?UTF-8?q?=E3=81=AE=E3=83=9A=E3=83=BC=E3=82=B8=E3=82=B9=E3=82=BF=E3=82=A4?= =?UTF-8?q?=E3=83=AB=E3=83=AA=E3=83=B3=E3=82=AF=E3=82=92=E6=8A=BC=E4=B8=8B?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=81=A8Warning=E3=81=8C=E7=99=BA=E7=94=9F?= =?UTF-8?q?=E3=81=99=E3=82=8B=E5=95=8F=E9=A1=8C=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pagestyle/view/edit/init/Init.class.php | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) mode change 100644 => 100755 html/webapp/modules/dialog/pagestyle/view/edit/init/Init.class.php diff --git a/html/webapp/modules/dialog/pagestyle/view/edit/init/Init.class.php b/html/webapp/modules/dialog/pagestyle/view/edit/init/Init.class.php old mode 100644 new mode 100755 index e96e140..54925aa --- a/html/webapp/modules/dialog/pagestyle/view/edit/init/Init.class.php +++ b/html/webapp/modules/dialog/pagestyle/view/edit/init/Init.class.php @@ -213,23 +213,23 @@ function execute() } else { $this->background_color[$key] = ""; } - - foreach($border_array as $border => $border_value) { - if(isset($theme_list[$key][$border])) { - if($key == "general") { - $this->headercolumn[$border_value] = explode(",",$theme_list[$key][$border]); - $this->leftcolumn[$border_value] = explode(",",$theme_list[$key][$border]); - $this->rightcolumn[$border_value] = explode(",",$theme_list[$key][$border]); - $this->centercolumn[$border_value] = explode(",",$theme_list[$key][$border]); - $this->footercolumn[$border_value] = explode(",",$theme_list[$key][$border]); - } else { - $this->$key[$border_value] = explode(",",$theme_list[$key][$border]); - } + + foreach ($border_array as $border => $border_value) { + if (!isset($theme_list[$key][$border])) { + // 未定義の場合はセットせず、generalの値を使用する + continue; + } + if ($key == "general") { + $this->headercolumn[$border_value] = explode(",", $theme_list[$key][$border]); + $this->leftcolumn[$border_value] = explode(",", $theme_list[$key][$border]); + $this->rightcolumn[$border_value] = explode(",", $theme_list[$key][$border]); + $this->centercolumn[$border_value] = explode(",", $theme_list[$key][$border]); + $this->footercolumn[$border_value] = explode(",", $theme_list[$key][$border]); } else { - $this->$key[$border_value] = ""; + // 定義されている場合は定義内容をセットする + $this->{$key}[$border_value] = explode(",", $theme_list[$key][$border]); } } - } } } From dbda8c1e520b8d2928d09d9d04aa766e1aed6608 Mon Sep 17 00:00:00 2001 From: ohga Date: Fri, 13 Feb 2015 10:58:59 +0900 Subject: [PATCH 06/65] =?UTF-8?q?php5.4=E4=BB=A5=E4=B8=8A=E3=81=AE?= =?UTF-8?q?=E7=92=B0=E5=A2=83=E3=81=A7=E3=83=96=E3=83=AD=E3=83=83=E3=82=AF?= =?UTF-8?q?=E3=82=B9=E3=82=BF=E3=82=A4=E3=83=AB=E3=82=BF=E3=83=96=E3=82=92?= =?UTF-8?q?=E6=8A=BC=E4=B8=8B=E3=81=99=E3=82=8B=E3=81=A8Warning=E3=81=8C?= =?UTF-8?q?=E7=99=BA=E7=94=9F=E3=81=99=E3=82=8B=E5=95=8F=E9=A1=8C=E3=81=AE?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/webapp/components/common/Main.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 html/webapp/components/common/Main.class.php diff --git a/html/webapp/components/common/Main.class.php b/html/webapp/components/common/Main.class.php old mode 100644 new mode 100755 index febd5c0..feec79f --- a/html/webapp/components/common/Main.class.php +++ b/html/webapp/components/common/Main.class.php @@ -187,7 +187,7 @@ function viewAssign(&$renderer) { $renderer->assign('module_id',$modules[$pathList[0]]['module_id']); } else { $module_id = 0; - $renderer->assign('module_obj',""); + $renderer->assign('module_obj', array()); $renderer->assign('module_id',0); } From b596343ff72af2d1121305967471defc673e1bbb Mon Sep 17 00:00:00 2001 From: Rika Fujiwara Date: Mon, 16 Feb 2015 13:43:03 +0900 Subject: [PATCH 07/65] =?UTF-8?q?=E3=83=AB=E3=83=BC=E3=83=A0=E7=AE=A1?= =?UTF-8?q?=E7=90=86=EF=BC=9E=E3=83=A2=E3=82=B8=E3=83=A5=E3=83=BC=E3=83=AB?= =?UTF-8?q?=E3=81=AE=E5=88=A9=E7=94=A8=E8=A8=B1=E5=8F=AF=E3=81=AB=E3=81=A6?= =?UTF-8?q?=E3=80=81=E6=96=B0=E3=81=9F=E3=81=AA=E3=83=A2=E3=82=B8=E3=83=A5?= =?UTF-8?q?=E3=83=BC=E3=83=AB=E3=82=92=E5=88=A9=E7=94=A8=E3=81=A7=E3=81=8D?= =?UTF-8?q?=E3=82=8B=E6=96=B9=E3=81=AB=E8=BF=BD=E5=8A=A0=E3=81=97=E3=81=9F?= =?UTF-8?q?=E3=81=A8=E3=81=8D=E3=80=81=E5=AF=BE=E8=B1=A1=E3=81=AE=E3=83=AB?= =?UTF-8?q?=E3=83=BC=E3=83=A0=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=AB=E3=82=B0?= =?UTF-8?q?=E3=83=AB=E3=83=BC=E3=83=97=E6=9E=A0=E3=81=A7=E3=81=8F=E3=81=8F?= =?UTF-8?q?=E3=81=A3=E3=81=9F=E3=83=A2=E3=82=B8=E3=83=A5=E3=83=BC=E3=83=AB?= =?UTF-8?q?=E3=83=96=E3=83=AD=E3=83=83=E3=82=AF=E7=BE=A4=E3=81=8C=E3=81=82?= =?UTF-8?q?=E3=82=8B=E3=81=A8=E3=80=81=E3=81=9D=E3=81=AE=E3=82=B0=E3=83=AB?= =?UTF-8?q?=E3=83=BC=E3=83=97=E6=9E=A0=E3=81=8C=E5=89=8A=E9=99=A4=E3=81=95?= =?UTF-8?q?=E3=82=8C=E3=81=A6=E3=80=81=E3=82=B0=E3=83=AB=E3=83=BC=E3=83=97?= =?UTF-8?q?=E6=9E=A0=E4=B8=AD=E3=81=AE=E9=85=8D=E7=BD=AE=E3=81=8C=E5=85=A8?= =?UTF-8?q?=E3=81=A6=E6=B6=88=E3=81=95=E3=82=8C=E3=82=8B=E7=8F=BE=E8=B1=A1?= =?UTF-8?q?=E3=81=AB=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/selmodules/Selmodules.class.php | 43 ++++++++++--------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/html/webapp/modules/room/action/admin/selmodules/Selmodules.class.php b/html/webapp/modules/room/action/admin/selmodules/Selmodules.class.php index 95f6152..769d9d0 100644 --- a/html/webapp/modules/room/action/admin/selmodules/Selmodules.class.php +++ b/html/webapp/modules/room/action/admin/selmodules/Selmodules.class.php @@ -76,30 +76,31 @@ function execute() $isError = true; } - $sql = "SELECT B.block_id, " - . "B.page_id " - . "FROM {blocks} B " - . "INNER JOIN {pages} P " - . "ON B.page_id = P.page_id " - . "WHERE P.room_id = ? " - . "AND B.module_id IN ('" . implode("','", $unusableModuleIds) . "')"; - $blocks =& $this->db->execute($sql, $roomId); - if ($blocks === false) { - $this->db->addError(); - } + if(count($unusableModuleIds) > 0) { + $sql = "SELECT B.block_id, " + . "B.page_id " + . "FROM {blocks} B " + . "INNER JOIN {pages} P " + . "ON B.page_id = P.page_id " + . "WHERE P.room_id = ? " + . "AND B.module_id IN ('" . implode("','", $unusableModuleIds) . "')"; + $blocks =& $this->db->execute($sql, $roomId); + if ($blocks === false) { + $this->db->addError(); + } - foreach($blocks as $block) { - $request = array( - 'block_id' => $block['block_id'], - 'page_id' => $block['page_id'] - ); - $result = $this->preexecuteMain->preExecute('pages_actionblock_deleteblock', $request); - if ($result === false - || $result === 'false') { - $isError = true; + foreach($blocks as $block) { + $request = array( + 'block_id' => $block['block_id'], + 'page_id' => $block['page_id'] + ); + $result = $this->preexecuteMain->preExecute('pages_actionblock_deleteblock', $request); + if ($result === false + || $result === 'false') { + $isError = true; + } } } - if($isError) { return 'error'; } From 779056a86e8a3735a81df7979c84a35e0e678378 Mon Sep 17 00:00:00 2001 From: ohga Date: Thu, 19 Feb 2015 14:11:34 +0900 Subject: [PATCH 08/65] =?UTF-8?q?[php5.4=E4=BB=A5=E4=B8=8A=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C]=E3=83=A2=E3=82=B8=E3=83=A5=E3=83=BC=E3=83=AB?= =?UTF-8?q?=E3=82=A2=E3=83=83=E3=83=97=E3=83=87=E3=83=BC=E3=83=88=E3=81=AE?= =?UTF-8?q?=E9=9A=9B=E3=81=ABWarning=E3=81=8C=E5=87=BA=E3=82=8B=E5=95=8F?= =?UTF-8?q?=E9=A1=8C=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit smartyのコンパイルの処理でWarningが出ているが、smartyのコードは修正しない方針のため、error_reportingを変更することで回避 --- html/webapp/modules/module/components/Compmain.class.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) mode change 100644 => 100755 html/webapp/modules/module/components/Compmain.class.php diff --git a/html/webapp/modules/module/components/Compmain.class.php b/html/webapp/modules/module/components/Compmain.class.php old mode 100644 new mode 100755 index e8f71e4..026bbb8 --- a/html/webapp/modules/module/components/Compmain.class.php +++ b/html/webapp/modules/module/components/Compmain.class.php @@ -45,6 +45,9 @@ function Module_Components_Compmain() { * @access public */ function clearCacheByDirname($dirname) { + $currentErrorReporting = error_reporting(); + error_reporting($currentErrorReporting & ~E_WARNING); + // ---------------------------------------------- // --- キャッシュクリア --- // ---------------------------------------------- @@ -76,10 +79,13 @@ function clearCacheByDirname($dirname) { //キャッシュクリア $renderer->clear_cache(); $cache->setClearCache($clear_cache); //元に戻す - + + error_reporting($currentErrorReporting); return true; } } + + error_reporting($currentErrorReporting); return false; } From bbef20dec00755d7ce3f277e1a06a40ae5922e6c Mon Sep 17 00:00:00 2001 From: ohga Date: Thu, 19 Feb 2015 14:14:55 +0900 Subject: [PATCH 09/65] =?UTF-8?q?[php5.4=E4=BB=A5=E4=B8=8A=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C]grid=E3=81=8C=E6=AD=A3=E5=B8=B8=E3=81=AB=E5=8B=95?= =?UTF-8?q?=E4=BD=9C=E3=81=97=E3=81=AA=E3=81=84=E5=95=8F=E9=A1=8C=E3=81=AE?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-typeをセットする際にcharsetが付与されてしまう関係で正しい条件文に入っていなかったため修正 --- html/webapp/modules/common/files/js/common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/webapp/modules/common/files/js/common.js b/html/webapp/modules/common/files/js/common.js index b9caa57..c499616 100644 --- a/html/webapp/modules/common/files/js/common.js +++ b/html/webapp/modules/common/files/js/common.js @@ -1175,7 +1175,7 @@ clsCommon.prototype = { //} if(this['callbackfunc']){ - if (transport.getResponseHeader("Content-Type") == "text/xml" && transport.responseXML) { + if (transport.getResponseHeader("Content-Type").substring(0, 8) === "text/xml" && transport.responseXML) { res = transport.responseXML; } From f54efe5d4cf59135cc3217b86f6995f23585f011 Mon Sep 17 00:00:00 2001 From: ohga Date: Thu, 26 Feb 2015 16:12:28 +0900 Subject: [PATCH 10/65] =?UTF-8?q?[php5.4=E4=BB=A5=E4=B8=8A=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C]=E6=9C=AA=E3=82=A4=E3=83=B3=E3=82=B9=E3=83=88?= =?UTF-8?q?=E3=83=BC=E3=83=AB=E3=83=A2=E3=82=B8=E3=83=A5=E3=83=BC=E3=83=AB?= =?UTF-8?q?=E3=81=8C=E3=81=AA=E3=81=84=E3=81=A8=E3=81=8D=E3=81=ABWarning?= =?UTF-8?q?=E3=81=8C=E5=87=BA=E3=82=8B=E5=95=8F=E9=A1=8C=E3=81=AE=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 未インストールモジュールがないときにモジュール管理を表示するとWarningが出る問題の修正 --- html/webapp/modules/module/view/admin/init/Init.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/webapp/modules/module/view/admin/init/Init.class.php b/html/webapp/modules/module/view/admin/init/Init.class.php index 81ffa04..c6b10e0 100644 --- a/html/webapp/modules/module/view/admin/init/Init.class.php +++ b/html/webapp/modules/module/view/admin/init/Init.class.php @@ -19,7 +19,7 @@ class Module_View_Admin_Init extends Action // 値をセットするため var $sysmodules_obj = null; var $modules_obj = null; - var $installs_obj = null; + var $installs_obj = array(); var $maxNum = 0; var $sysMaxNum = 0; From d12a6655256cd50569d475298445a11e6d81063f Mon Sep 17 00:00:00 2001 From: ohga Date: Thu, 26 Feb 2015 16:17:57 +0900 Subject: [PATCH 11/65] =?UTF-8?q?[php5.4=E4=BB=A5=E4=B8=8A=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C]=E3=83=86=E3=83=B3=E3=83=97=E3=83=AC=E3=83=BC?= =?UTF-8?q?=E3=83=88=E3=81=A7=E4=B8=8D=E6=AD=A3=E3=81=AA=E5=8F=97=E3=81=91?= =?UTF-8?q?=E5=8F=96=E3=82=8A=E6=96=B9=E3=82=92=E3=81=97=E3=81=A6=E3=81=84?= =?UTF-8?q?=E3=82=8B=E3=81=9F=E3=82=81=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit セッションの_use_db_debugに「_ON」か「_OFF」のいずれかを入れているのに、テンプレートでは_use_db_debug.conf_valueを使用していたため修正 --- .../templates/default/system_view_main_development.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/html/webapp/modules/system/templates/default/system_view_main_development.html b/html/webapp/modules/system/templates/default/system_view_main_development.html index 3546e0e..8ef364a 100644 --- a/html/webapp/modules/system/templates/default/system_view_main_development.html +++ b/html/webapp/modules/system/templates/default/system_view_main_development.html @@ -3,9 +3,9 @@
<{$lang.system_debug_title|smarty:nodefaults}>
- <{if !$smarty.session._use_db_debug.conf_value}> checked="checked"<{/if}> /> + <{if !$smarty.session._use_db_debug}> checked="checked"<{/if}> /> - <{if $smarty.session._use_db_debug.conf_value}> checked="checked"<{/if}> /> + <{if $smarty.session._use_db_debug}> checked="checked"<{/if}> />

From 73a979ee1e380757b3a9af066420a2dfca0c786d Mon Sep 17 00:00:00 2001 From: ohga Date: Thu, 26 Feb 2015 16:23:04 +0900 Subject: [PATCH 12/65] =?UTF-8?q?[php5.4=E4=BB=A5=E4=B8=8A=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C]=E6=9C=AA=E4=BD=BF=E7=94=A8=E3=81=AE=E3=83=86?= =?UTF-8?q?=E3=83=B3=E3=83=97=E3=83=AC=E3=83=BC=E3=83=88=E3=82=92=E8=AA=AD?= =?UTF-8?q?=E3=81=BF=E8=BE=BC=E3=82=93=E3=81=A7=E3=81=84=E3=82=8B=E3=81=9F?= =?UTF-8?q?=E3=82=81=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/webapp/modules/system/action/development/maple.ini | 2 +- html/webapp/modules/system/action/general/maple.ini | 2 +- html/webapp/modules/system/action/mail/maple.ini | 2 +- html/webapp/modules/system/action/membership/maple.ini | 2 +- html/webapp/modules/system/action/meta/maple.ini | 2 +- html/webapp/modules/system/action/pagestyle/maple.ini | 2 +- html/webapp/modules/system/action/server/maple.ini | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) mode change 100644 => 100755 html/webapp/modules/system/action/development/maple.ini mode change 100644 => 100755 html/webapp/modules/system/action/general/maple.ini mode change 100644 => 100755 html/webapp/modules/system/action/mail/maple.ini mode change 100644 => 100755 html/webapp/modules/system/action/membership/maple.ini mode change 100644 => 100755 html/webapp/modules/system/action/meta/maple.ini mode change 100644 => 100755 html/webapp/modules/system/action/pagestyle/maple.ini mode change 100644 => 100755 html/webapp/modules/system/action/server/maple.ini diff --git a/html/webapp/modules/system/action/development/maple.ini b/html/webapp/modules/system/action/development/maple.ini old mode 100644 new mode 100755 index cca3f8a..95e0944 --- a/html/webapp/modules/system/action/development/maple.ini +++ b/html/webapp/modules/system/action/development/maple.ini @@ -6,4 +6,4 @@ action="system_view_main_development" session = "ref:Session" [View] -success = "system_view_main_development.html" \ No newline at end of file +success = "main:true.html" \ No newline at end of file diff --git a/html/webapp/modules/system/action/general/maple.ini b/html/webapp/modules/system/action/general/maple.ini old mode 100644 new mode 100755 index a405650..4c57027 --- a/html/webapp/modules/system/action/general/maple.ini +++ b/html/webapp/modules/system/action/general/maple.ini @@ -25,4 +25,4 @@ add_private_space_name.EscapeText = closesite_text.EscapeText = [View] -success = "system_view_main_general.html" \ No newline at end of file +success = "main:true.html" \ No newline at end of file diff --git a/html/webapp/modules/system/action/mail/maple.ini b/html/webapp/modules/system/action/mail/maple.ini old mode 100644 new mode 100755 index b546f81..85f3852 --- a/html/webapp/modules/system/action/mail/maple.ini +++ b/html/webapp/modules/system/action/mail/maple.ini @@ -14,4 +14,4 @@ mode="check" action="system_view_main_mail" [View] -success = "system_view_main_mail.html" \ No newline at end of file +success = "main:true.html" \ No newline at end of file diff --git a/html/webapp/modules/system/action/membership/maple.ini b/html/webapp/modules/system/action/membership/maple.ini old mode 100644 new mode 100755 index 7315a4d..a8529f3 --- a/html/webapp/modules/system/action/membership/maple.ini +++ b/html/webapp/modules/system/action/membership/maple.ini @@ -14,4 +14,4 @@ action="system_view_main_membership" systemView = "ref:systemView" [View] -success = "system_view_main_membership.html" \ No newline at end of file +success = "main:true.html" \ No newline at end of file diff --git a/html/webapp/modules/system/action/meta/maple.ini b/html/webapp/modules/system/action/meta/maple.ini old mode 100644 new mode 100755 index 7f4547f..9ff371b --- a/html/webapp/modules/system/action/meta/maple.ini +++ b/html/webapp/modules/system/action/meta/maple.ini @@ -14,4 +14,4 @@ mode="check" action="system_view_main_meta" [View] -success = "system_view_main_meta.html" \ No newline at end of file +success = "main:true.html" \ No newline at end of file diff --git a/html/webapp/modules/system/action/pagestyle/maple.ini b/html/webapp/modules/system/action/pagestyle/maple.ini old mode 100644 new mode 100755 index 7301b0a..4cf63f8 --- a/html/webapp/modules/system/action/pagestyle/maple.ini +++ b/html/webapp/modules/system/action/pagestyle/maple.ini @@ -13,4 +13,4 @@ mode="check" action="system_view_main_pagestyle" [View] -success = "system_view_main_pagestyle.html" \ No newline at end of file +success = "main:true.html" \ No newline at end of file diff --git a/html/webapp/modules/system/action/server/maple.ini b/html/webapp/modules/system/action/server/maple.ini old mode 100644 new mode 100755 index cdc8581..5b9717f --- a/html/webapp/modules/system/action/server/maple.ini +++ b/html/webapp/modules/system/action/server/maple.ini @@ -29,4 +29,4 @@ mode="check" action="system_view_main_server" [View] -success = "system_view_main_server.html" \ No newline at end of file +success = "main:true.html" \ No newline at end of file From e5fe67ccdadb0706d20e3eb94852d6bac60577de Mon Sep 17 00:00:00 2001 From: ohga Date: Thu, 26 Feb 2015 16:28:15 +0900 Subject: [PATCH 13/65] =?UTF-8?q?[php5.4=E4=BB=A5=E4=B8=8A=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C]=E6=9C=AA=E4=BD=BF=E7=94=A8=E3=81=AE=E3=83=86?= =?UTF-8?q?=E3=83=B3=E3=83=97=E3=83=AC=E3=83=BC=E3=83=88=E3=82=92=E8=AA=AD?= =?UTF-8?q?=E3=81=BF=E8=BE=BC=E3=82=93=E3=81=A7=E3=81=84=E3=82=8B=E3=81=9F?= =?UTF-8?q?=E3=82=81=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/webapp/modules/room/view/admin/import/upload/maple.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 html/webapp/modules/room/view/admin/import/upload/maple.ini diff --git a/html/webapp/modules/room/view/admin/import/upload/maple.ini b/html/webapp/modules/room/view/admin/import/upload/maple.ini old mode 100644 new mode 100755 index e343b5a..a6c97d9 --- a/html/webapp/modules/room/view/admin/import/upload/maple.ini +++ b/html/webapp/modules/room/view/admin/import/upload/maple.ini @@ -20,5 +20,5 @@ roomView = "ref:roomView" [View] define:attachment = 1 +success = "main:true.html" error = "main:error.html" - From 3193cb61c0dbca77fd2a0b0a951b39aded226126 Mon Sep 17 00:00:00 2001 From: ohga Date: Thu, 26 Feb 2015 16:31:20 +0900 Subject: [PATCH 14/65] =?UTF-8?q?[php5.4=E4=BB=A5=E4=B8=8A=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C]=E6=9C=AA=E4=BD=BF=E7=94=A8=E3=81=AE=E3=83=86?= =?UTF-8?q?=E3=83=B3=E3=83=97=E3=83=AC=E3=83=BC=E3=83=88=E3=82=92=E8=AA=AD?= =?UTF-8?q?=E3=81=BF=E8=BE=BC=E3=82=93=E3=81=A7=E3=81=84=E3=82=8B=E3=81=9F?= =?UTF-8?q?=E3=82=81=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../user/view/admin/import/download/Download.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 html/webapp/modules/user/view/admin/import/download/Download.class.php diff --git a/html/webapp/modules/user/view/admin/import/download/Download.class.php b/html/webapp/modules/user/view/admin/import/download/Download.class.php old mode 100644 new mode 100755 index bf2fd0a..ce4eb6b --- a/html/webapp/modules/user/view/admin/import/download/Download.class.php +++ b/html/webapp/modules/user/view/admin/import/download/Download.class.php @@ -35,8 +35,8 @@ function execute() } else { return 'error'; } - - return 'success'; + + exit; } } ?> \ No newline at end of file From b740e2e768416ea5cbeb9306e1f5c7a95a46edd7 Mon Sep 17 00:00:00 2001 From: ohga Date: Thu, 26 Feb 2015 16:41:45 +0900 Subject: [PATCH 15/65] =?UTF-8?q?[php5.4=E4=BB=A5=E4=B8=8A=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C]=E3=80=8C=E3=83=9A=E3=83=BC=E3=82=B8=E3=83=86?= =?UTF-8?q?=E3=83=BC=E3=83=9E=E3=81=AB=E3=82=88=E3=82=8A=E8=87=AA=E5=8B=95?= =?UTF-8?q?=E7=9A=84=E3=81=AB=E9=81=B8=E6=8A=9E=E3=80=8D=E3=82=92=E6=8A=BC?= =?UTF-8?q?=E4=B8=8B=E3=81=99=E3=82=8B=E3=81=A8Warning=E3=81=8C=E5=87=BA?= =?UTF-8?q?=E3=82=8B=E5=95=8F=E9=A1=8C=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit グループ化されたブロックがある場合で、クラシックなどの特定のページスタイルのときに、ブロックスタイルの「ページテーマにより自動的に選択」を押下するとWarningが出る問題の修正 --- html/webapp/modules/pages/components/Compmain.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 html/webapp/modules/pages/components/Compmain.class.php diff --git a/html/webapp/modules/pages/components/Compmain.class.php b/html/webapp/modules/pages/components/Compmain.class.php old mode 100644 new mode 100755 index baf3bde..6773625 --- a/html/webapp/modules/pages/components/Compmain.class.php +++ b/html/webapp/modules/pages/components/Compmain.class.php @@ -127,7 +127,7 @@ function setPageFetch(&$blocks_obj,&$pages_obj,&$html, $template_dir, $display_p $this->_renderer->assign('url',$block['full_path']); $this->_renderer->assign('encode_url',rawurlencode($block['full_path'])); $this->_renderer->assign('id',"_".$block['block_id']); - $this->_renderer->assign('module_obj',""); + $this->_renderer->assign('module_obj', array()); $this->_renderer->assign('headermenu',""); //最小広さ設定 From 3393804cab8d8095607fa6cc1bd4c3466b120c85 Mon Sep 17 00:00:00 2001 From: ohga Date: Thu, 26 Feb 2015 16:49:58 +0900 Subject: [PATCH 16/65] =?UTF-8?q?[php5.4=E4=BB=A5=E4=B8=8A=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C]=E3=83=87=E3=83=95=E3=82=A9=E3=83=AB=E3=83=88?= =?UTF-8?q?=E5=8F=82=E5=8A=A0=E3=81=AE=E3=83=AB=E3=83=BC=E3=83=A0=E3=81=A7?= =?UTF-8?q?=E3=83=A1=E3=83=BC=E3=83=AB=E9=80=81=E4=BF=A1=E3=82=92=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=81=A8Warning=E3=81=8C=E5=87=BA=E3=82=8B=E5=95=8F?= =?UTF-8?q?=E9=A1=8C=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit デフォルト参加のルームで日誌などの「投稿をメールで通知する」処理が動いたときにWarningが出る問題の修正 --- html/webapp/components/users/View.class.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) mode change 100644 => 100755 html/webapp/components/users/View.class.php diff --git a/html/webapp/components/users/View.class.php b/html/webapp/components/users/View.class.php old mode 100644 new mode 100755 index 76e19af..b55098f --- a/html/webapp/components/users/View.class.php +++ b/html/webapp/components/users/View.class.php @@ -540,8 +540,12 @@ function &getSendMailUsers($page_id=null, $more_than_authority_id=null, $type = $sql .= ")"; $func = array($this, '_fetchcallbackSendMail'); $authoritiesView =& $this->_container->getComponent("authoritiesView"); - $authorities = $authoritiesView->getAuthorities(null, null, null, null, true); - $func_params = array($more_than_authority_id, $authorities, $items); + $authorities = $authoritiesView->getAuthorities(null, null); + $authoritiesById = array(); + foreach ((array)$authorities as $authority) { + $authoritiesById[$authority['role_authority_id']] = $authority; + } + $func_params = array($more_than_authority_id, $authoritiesById, $items); } else { // ルームID指定なし // 会員の user_authority_idのみでメールを送信 From 3a8c13f683198eaf18f9c78bf4948ce02f189951 Mon Sep 17 00:00:00 2001 From: ohga Date: Thu, 26 Feb 2015 17:06:33 +0900 Subject: [PATCH 17/65] =?UTF-8?q?[php5.4=E4=BB=A5=E4=B8=8A=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C]=E7=B7=A8=E9=9B=86=E7=94=BB=E9=9D=A2=E3=81=A7?= =?UTF-8?q?=E5=AD=90=E3=81=AE=E3=81=84=E3=81=AA=E3=81=84=E3=83=A1=E3=83=8B?= =?UTF-8?q?=E3=83=A5=E3=83=BC=E3=82=92=E3=82=AF=E3=83=AA=E3=83=83=E3=82=AF?= =?UTF-8?q?=E3=81=97=E3=81=9F=E3=81=A8=E3=81=8D=E3=81=ABWarning=E3=81=8C?= =?UTF-8?q?=E5=87=BA=E3=82=8B=E5=95=8F=E9=A1=8C=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/webapp/modules/menu/templates/menu_view_edit_detail.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) mode change 100644 => 100755 html/webapp/modules/menu/templates/menu_view_edit_detail.html diff --git a/html/webapp/modules/menu/templates/menu_view_edit_detail.html b/html/webapp/modules/menu/templates/menu_view_edit_detail.html old mode 100644 new mode 100755 index b748e27..22f9e36 --- a/html/webapp/modules/menu/templates/menu_view_edit_detail.html +++ b/html/webapp/modules/menu/templates/menu_view_edit_detail.html @@ -3,5 +3,7 @@ <{assign var="now_parent_id" value=$action.parent_id}> <{assign var="visibility_flag" value=$action.visibility_flag}> <{assign var="menus" value=$action.menus.$now_thread_num.$now_parent_id}> -<{include file="menu_view_edit_list.html"}> +<{if $menus}> + <{include file="menu_view_edit_list.html"}> +<{/if}> <{/strip}> \ No newline at end of file From 7d76d3f035c6d9577e725c35b555f05ccb7ed0a7 Mon Sep 17 00:00:00 2001 From: ohga Date: Thu, 26 Feb 2015 17:21:21 +0900 Subject: [PATCH 18/65] =?UTF-8?q?[php5.4=E4=BB=A5=E4=B8=8A=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C]=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=82=92?= =?UTF-8?q?=E5=89=8A=E9=99=A4=E3=81=97=E3=81=9F=E3=81=A8=E3=81=8D=E3=81=AB?= =?UTF-8?q?Warning=E3=81=8C=E5=87=BA=E3=82=8B=E3=81=9F=E3=82=81=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../multidatabase/action/main/addcontent/Addcontent.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 html/webapp/modules/multidatabase/action/main/addcontent/Addcontent.class.php diff --git a/html/webapp/modules/multidatabase/action/main/addcontent/Addcontent.class.php b/html/webapp/modules/multidatabase/action/main/addcontent/Addcontent.class.php old mode 100644 new mode 100755 index ada91f5..348bf24 --- a/html/webapp/modules/multidatabase/action/main/addcontent/Addcontent.class.php +++ b/html/webapp/modules/multidatabase/action/main/addcontent/Addcontent.class.php @@ -213,7 +213,7 @@ function execute() if ($result === false) { return 'error'; } - }else { + } elseif (is_array($datas[$metadata_id])) { $params = array( "upload_id" => $datas[$metadata_id]['upload_id'], "file_name" => $datas[$metadata_id]['file_name'], From 8cf663b66d5ed4ecc4af18bd5c5a3ac4a756d807 Mon Sep 17 00:00:00 2001 From: ohga Date: Thu, 26 Feb 2015 17:24:57 +0900 Subject: [PATCH 19/65] =?UTF-8?q?[php5.4=E4=BB=A5=E4=B8=8A=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C]=E7=94=BB=E5=83=8F=E3=81=AE=E9=A0=85=E7=9B=AE?= =?UTF-8?q?=E3=81=AB=E7=94=BB=E5=83=8F=E4=BB=A5=E5=A4=96=E3=81=AE=E6=8B=A1?= =?UTF-8?q?=E5=BC=B5=E5=AD=90=E3=81=AE=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB?= =?UTF-8?q?=E3=82=92=E3=82=A2=E3=83=83=E3=83=97=E3=83=AD=E3=83=BC=E3=83=89?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=81=A8Warning=E3=81=8C=E5=87=BA=E3=82=8B?= =?UTF-8?q?=E5=95=8F=E9=A1=8C=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../validator/Validator_MetadataInput.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) mode change 100644 => 100755 html/webapp/modules/multidatabase/validator/Validator_MetadataInput.class.php diff --git a/html/webapp/modules/multidatabase/validator/Validator_MetadataInput.class.php b/html/webapp/modules/multidatabase/validator/Validator_MetadataInput.class.php old mode 100644 new mode 100755 index aaab5fd..9c0c52d --- a/html/webapp/modules/multidatabase/validator/Validator_MetadataInput.class.php +++ b/html/webapp/modules/multidatabase/validator/Validator_MetadataInput.class.php @@ -154,9 +154,11 @@ function validate($attributes, $errStr, $params) if($pathinfo === false) { $errors['mdb_metadatas_'. $metadata_id] = _FILE_UPLOAD_ERR_IMAGETYPE; } - $size = $mdbView->getImageBlockSize($datas[$metadata_id]['physical_file_name']); - $input_datas[$metadata_id]['block_img_width'] = $size[0]; - $input_datas[$metadata_id]['block_img_height'] = $size[1]; + if (!isset($errors['mdb_metadatas_'. $metadata_id])) { + $size = $mdbView->getImageBlockSize($datas[$metadata_id]['physical_file_name']); + $input_datas[$metadata_id]['block_img_width'] = $size[0]; + $input_datas[$metadata_id]['block_img_height'] = $size[1]; + } } if($metadata['type'] == MULTIDATABASE_META_TYPE_FILE ) { From 2325b7a91bf05d4c585c1b3b037841567fc4c33e Mon Sep 17 00:00:00 2001 From: ohga Date: Thu, 26 Feb 2015 17:28:58 +0900 Subject: [PATCH 20/65] =?UTF-8?q?[php5.4=E4=BB=A5=E4=B8=8A=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C]=E5=9B=9E=E8=A6=A7=E4=BD=9C=E6=88=90=E7=94=BB?= =?UTF-8?q?=E9=9D=A2=E3=82=92=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B=E3=81=A8?= =?UTF-8?q?Warning=E3=81=8C=E5=87=BA=E3=82=8B=E5=95=8F=E9=A1=8C=E3=81=AE?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/webapp/modules/circular/view/main/create/Create.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 html/webapp/modules/circular/view/main/create/Create.class.php diff --git a/html/webapp/modules/circular/view/main/create/Create.class.php b/html/webapp/modules/circular/view/main/create/Create.class.php old mode 100644 new mode 100755 index dfdba8f..b12b7f7 --- a/html/webapp/modules/circular/view/main/create/Create.class.php +++ b/html/webapp/modules/circular/view/main/create/Create.class.php @@ -26,7 +26,7 @@ class Circular_View_Main_Create extends Action var $circularView = null; // 値をセットするため - var $circular_info = null; + var $circular_info = array(); var $circular_user_list = null; var $room_list_array = null; var $group_member_list = null; From b465a6a36f1b2e9f5807f427b4b8b7e2e7107e03 Mon Sep 17 00:00:00 2001 From: ohga Date: Fri, 27 Feb 2015 11:53:19 +0900 Subject: [PATCH 21/65] =?UTF-8?q?[php5.4=E4=BB=A5=E4=B8=8A=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C]=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=83=BB?= =?UTF-8?q?=E7=94=BB=E5=83=8F=E3=81=8C=E7=99=BB=E9=8C=B2=E3=81=95=E3=82=8C?= =?UTF-8?q?=E3=81=A6=E3=81=84=E3=82=8B=E3=81=A8=E3=81=8D=E3=81=AB=E3=80=81?= =?UTF-8?q?=E3=82=B3=E3=83=B3=E3=83=86=E3=83=B3=E3=83=84=E3=82=92=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E3=81=99=E3=82=8B=E3=81=A8Warning=E3=81=8C=E5=87=BA?= =?UTF-8?q?=E3=82=8B=E5=95=8F=E9=A1=8C=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ファイル・画像のどちらかが登録されているときに、ファイルのアップロードをしないでコンテンツを更新するとWarningが出る --- .../validator/Validator_MetadataInput.class.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/html/webapp/modules/multidatabase/validator/Validator_MetadataInput.class.php b/html/webapp/modules/multidatabase/validator/Validator_MetadataInput.class.php index 9c0c52d..1c29538 100755 --- a/html/webapp/modules/multidatabase/validator/Validator_MetadataInput.class.php +++ b/html/webapp/modules/multidatabase/validator/Validator_MetadataInput.class.php @@ -94,6 +94,8 @@ function validate($attributes, $errStr, $params) $metadata_id = $metadata['metadata_id']; $input_datas[$metadata_id] = ""; + + // ファイル・画像項目のアップロード情報 または エラー情報をセット if(isset($datas[$metadata_id])) { $input_datas[$metadata_id] = $datas[$metadata_id]; } @@ -207,9 +209,11 @@ function validate($attributes, $errStr, $params) $errors['mdb_metadatas_'. $metadata_id] = $metadata['name'].$datas[$metadata_id]['error_mes']; continue; - }else { - $input_datas[$metadata_id] = $session->getParameter(array("multidatabase_content", $attributes['block_id'], $metadata_id)); - if($metadata['type'] == MULTIDATABASE_META_TYPE_FILE && !empty($input_datas[$metadata_id])) { + } else { + if (!is_array($input_datas[$metadata_id]) || !isset($input_datas[$metadata_id]['upload_id'])) { + $input_datas[$metadata_id] = ''; + } + if($metadata['type'] === MULTIDATABASE_META_TYPE_FILE) { $this->_CheckDownloadPassword($metadata_id, $attributes, $objectName, $errorMsg, $errors); } } From 9837d1600090605c202ad596be5c8f23bde639bc Mon Sep 17 00:00:00 2001 From: ohga Date: Fri, 27 Feb 2015 12:12:53 +0900 Subject: [PATCH 22/65] =?UTF-8?q?[php5.4=E4=BB=A5=E4=B8=8A=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C]=E8=A1=A8=E7=A4=BA=E3=83=A1=E3=83=8B=E3=83=A5?= =?UTF-8?q?=E3=83=BC=E8=A8=AD=E5=AE=9A=E3=81=A7=E5=AD=90=E3=81=AE=E3=81=84?= =?UTF-8?q?=E3=81=AA=E3=81=84=E3=83=A1=E3=83=8B=E3=83=A5=E3=83=BC=E3=82=92?= =?UTF-8?q?=E3=82=AF=E3=83=AA=E3=83=83=E3=82=AF=E3=81=97=E3=81=9F=E3=81=A8?= =?UTF-8?q?=E3=81=8D=E3=81=ABWarning=E3=81=8C=E5=87=BA=E3=82=8B=E5=95=8F?= =?UTF-8?q?=E9=A1=8C=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/default/mobile_view_admin_menu_detail.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) mode change 100644 => 100755 html/webapp/modules/mobile/templates/default/mobile_view_admin_menu_detail.html diff --git a/html/webapp/modules/mobile/templates/default/mobile_view_admin_menu_detail.html b/html/webapp/modules/mobile/templates/default/mobile_view_admin_menu_detail.html old mode 100644 new mode 100755 index 9a9c9bc..0fdfcbf --- a/html/webapp/modules/mobile/templates/default/mobile_view_admin_menu_detail.html +++ b/html/webapp/modules/mobile/templates/default/mobile_view_admin_menu_detail.html @@ -6,5 +6,7 @@ <{assign var="alert_mess_disabled_menu" value=$lang.mobile_error_message_2|smarty:nodefaults|escape:"javascript"|escape:"html"}> <{assign var="alert_mess_disabled_node" value=$lang.mobile_error_message_3|smarty:nodefaults|escape:"javascript"|escape:"html"}> <{assign var="visibility_flag" value=$action.space_visibility_flag}> -<{include file="mobile_view_admin_menu_list.html"}> +<{if $menus}> + <{include file="mobile_view_admin_menu_list.html"}> +<{/if}> <{/strip}> From 670f5875a54a16ae4cc5a109c11c63e302de4b7b Mon Sep 17 00:00:00 2001 From: ohga Date: Fri, 27 Feb 2015 12:31:17 +0900 Subject: [PATCH 23/65] =?UTF-8?q?GoogleChrome=E3=81=A7=E3=80=8C=E5=90=8D?= =?UTF-8?q?=E5=89=8D=E3=82=92=E3=81=A4=E3=81=91=E3=81=A6=E3=83=AA=E3=83=B3?= =?UTF-8?q?=E3=82=AF=E5=85=88=E3=82=92=E4=BF=9D=E5=AD=98=E3=80=8D=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=81=A8=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E5=90=8D?= =?UTF-8?q?=E3=81=8C=E6=96=87=E5=AD=97=E5=8C=96=E3=81=91=E3=81=99=E3=82=8B?= =?UTF-8?q?=E5=95=8F=E9=A1=8C=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/webapp/components/uploads/View.class.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) mode change 100644 => 100755 html/webapp/components/uploads/View.class.php diff --git a/html/webapp/components/uploads/View.class.php b/html/webapp/components/uploads/View.class.php old mode 100644 new mode 100755 index eb03599..1d3a916 --- a/html/webapp/components/uploads/View.class.php +++ b/html/webapp/components/uploads/View.class.php @@ -350,17 +350,8 @@ function _headerOutput($filename, $pathname, $filesize, $mimetype, $cache_flag = } else { header("Content-disposition: attachment; filename=\"".$filename."\""); } - } elseif (stristr($_SERVER['HTTP_USER_AGENT'], "Chrome")) { - // GoogleChromeの場合 - if (stristr($_SERVER['HTTP_USER_AGENT'], "Windows")) { - // Windows版 - header("Content-disposition: inline; filename=\"".mb_convert_encoding($filename, "SJIS", _CHARSET)."\""); - } else { - // それ以外 - header("Content-disposition: inline; filename=\"".$filename."\""); - } } else { - // 上記以外(Mozilla, Firefox, NetScape) + // 上記以外(Mozilla, NetScape, GoogleChrome) header("Content-disposition: inline; filename=\"".$filename."\""); } if(!empty($pathname)) { From 9e92ec0ed48e4b127fa1cd63acce025f12b6a24e Mon Sep 17 00:00:00 2001 From: ohga Date: Fri, 27 Feb 2015 12:49:48 +0900 Subject: [PATCH 24/65] =?UTF-8?q?=E5=85=AC=E9=96=8B=E4=B8=AD=E2=87=94?= =?UTF-8?q?=E6=BA=96=E5=82=99=E4=B8=AD=E3=81=AE=E5=88=87=E3=82=8A=E6=9B=BF?= =?UTF-8?q?=E3=81=88=E3=81=8C=E3=82=B5=E3=83=96=E3=83=AB=E3=83=BC=E3=83=A0?= =?UTF-8?q?=E3=81=AB=E5=8F=8D=E6=98=A0=E3=81=95=E3=82=8C=E3=81=AA=E3=81=84?= =?UTF-8?q?=E4=B8=8D=E5=85=B7=E5=90=88=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../room/action/admin/chgdisplay/Chgdisplay.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 html/webapp/modules/room/action/admin/chgdisplay/Chgdisplay.class.php diff --git a/html/webapp/modules/room/action/admin/chgdisplay/Chgdisplay.class.php b/html/webapp/modules/room/action/admin/chgdisplay/Chgdisplay.class.php old mode 100644 new mode 100755 index 847a6c9..173d264 --- a/html/webapp/modules/room/action/admin/chgdisplay/Chgdisplay.class.php +++ b/html/webapp/modules/room/action/admin/chgdisplay/Chgdisplay.class.php @@ -53,9 +53,9 @@ function execute() // --- 準備中->公開中に変更した場合、そのサブグループも公開中にする // ---------------------------------------------------------------------- if($this->page['display_flag'] != $display_flag) { - $where_params = array ( - "room_id"=>intval($this->edit_current_page_id) - ); + $where_params = array( + "parent_id" => intval($this->edit_current_page_id) + ); $subgroup_pages_id_arr =& $this->pagesView->getPages($where_params, null, null, null, array($this, "_subpagesFetchcallback")); if(count($subgroup_pages_id_arr) > 0) { $params = array( From 8d0cdfb92db8a2cbfb9b0c6ed117689311ea87e2 Mon Sep 17 00:00:00 2001 From: ohga Date: Fri, 27 Feb 2015 13:59:31 +0900 Subject: [PATCH 25/65] =?UTF-8?q?get=5Fclass=E3=81=AE=E5=BC=95=E6=95=B0?= =?UTF-8?q?=E3=81=ABobject=E4=BB=A5=E5=A4=96=E3=82=92=E6=B8=A1=E3=81=99?= =?UTF-8?q?=E3=81=A8Warning=E3=81=8C=E5=87=BA=E3=82=8B=E3=81=9F=E3=82=81?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit http://php.net/manual/ja/function.get-class.php#refsect1-function.get-class-errors --- html/webapp/modules/rss/components/Parse.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 html/webapp/modules/rss/components/Parse.class.php diff --git a/html/webapp/modules/rss/components/Parse.class.php b/html/webapp/modules/rss/components/Parse.class.php old mode 100644 new mode 100755 index 2479dfd..2b56995 --- a/html/webapp/modules/rss/components/Parse.class.php +++ b/html/webapp/modules/rss/components/Parse.class.php @@ -55,7 +55,7 @@ function &parse($xml, $encoding) $unserializer->unserialize($xml); $xmlArray = $unserializer->getUnserializedData(); if (empty($xmlArray)) return $xmlArray; - if (strtolower(get_class($xmlArray)) == "pear_error") { + if (gettype($xmlArray) === 'object' && strtolower(get_class($xmlArray)) == "pear_error") { $container =& DIContainerFactory::getContainer(); $actionChain =& $container->getComponent("ActionChain"); $errorList =& $actionChain->getCurErrorList(); From 64f53fa62f2ce0160d3d03bb7728c5ca3471a762 Mon Sep 17 00:00:00 2001 From: ohga Date: Fri, 27 Feb 2015 14:04:10 +0900 Subject: [PATCH 26/65] =?UTF-8?q?=E3=80=8Cauthor=E3=80=8D=E3=81=8Cxml?= =?UTF-8?q?=E3=81=AB=E5=90=AB=E3=81=BE=E3=82=8C=E3=81=AA=E3=81=84=E5=A0=B4?= =?UTF-8?q?=E5=90=88=E3=81=8C=E3=81=82=E3=82=8B=E3=81=9F=E3=82=81=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 「author」の値を入れている「webmaster」は未使用のため削除する --- html/webapp/modules/rss/components/Parse.class.php | 1 - 1 file changed, 1 deletion(-) diff --git a/html/webapp/modules/rss/components/Parse.class.php b/html/webapp/modules/rss/components/Parse.class.php index 2b56995..8e3abc2 100755 --- a/html/webapp/modules/rss/components/Parse.class.php +++ b/html/webapp/modules/rss/components/Parse.class.php @@ -76,7 +76,6 @@ function &parse($xml, $encoding) "link" => !empty($xmlArray["link"]["href"]) ? $xmlArray["link"]["href"] : (!empty($xmlArray["link"][0]["href"]) ? $xmlArray["link"][0]["href"] : ""), "lastbuilddate" => !empty($xmlArray["updated"]) ? $xmlArray["updated"] : $xmlArray["modified"], "id" => !empty($xmlArray["id"]) ? $xmlArray["id"] : "", - "webmaster" => $xmlArray["author"]["name"], "generator" => !empty($xmlArray["generator"]) ? $xmlArray["generator"] : "", ); if (isset($xmlArray["entry"]["title"])) { From 635e64ae9e31cb662653f51bc3f45c7fc4c514d3 Mon Sep 17 00:00:00 2001 From: ohga Date: Fri, 27 Feb 2015 15:05:32 +0900 Subject: [PATCH 27/65] =?UTF-8?q?=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB?= =?UTF-8?q?=E3=83=BB=E3=83=95=E3=82=A9=E3=83=AB=E3=83=80=E3=81=8C=E3=81=AA?= =?UTF-8?q?=E3=81=84=E3=81=A8=E3=81=8D=E3=81=AB=E3=82=BD=E3=83=BC=E3=83=88?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=81=A8javascript=E3=82=A8=E3=83=A9?= =?UTF-8?q?=E3=83=BC=E3=81=A8=E3=81=AA=E3=82=8B=E3=81=9F=E3=82=81=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/cabinet/files/js/default/cabinet.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) mode change 100644 => 100755 html/webapp/modules/cabinet/files/js/default/cabinet.js diff --git a/html/webapp/modules/cabinet/files/js/default/cabinet.js b/html/webapp/modules/cabinet/files/js/default/cabinet.js old mode 100644 new mode 100755 index 2945245..8bd57d3 --- a/html/webapp/modules/cabinet/files/js/default/cabinet.js +++ b/html/webapp/modules/cabinet/files/js/default/cabinet.js @@ -105,6 +105,11 @@ clsCabinet.prototype = { }, sortBy: function(sort_col) { + var fileListEl = $("cabinet_file_list" + this.id); + if (!fileListEl) { + return; + } + if(this.sortCol == null) { this.sortDir = "DESC"; }else { @@ -121,8 +126,6 @@ clsCabinet.prototype = { } this.sortCol = sort_col; - $("cabinet_file_list" + this.id).innerHTML = ""; - var top_el = $(this.id); var params = new Object(); params["param"] = { @@ -134,7 +137,7 @@ clsCabinet.prototype = { "success":"html" }; params["top_el"] = top_el; - params["target_el"] = $("cabinet_file_list" + this.id); + params["target_el"] = fileListEl; params["callbackfunc"] = function(res) { var imgObj = $("cabinet_sort_img" + this.id + "_" + this.sortCol); if(this.sortDir == "ASC") { @@ -149,7 +152,7 @@ clsCabinet.prototype = { this.oldSortCol = null; } }.bind(this); - + commonCls.send(params); }, From d19e2868d2b37acd904c4fad70406c33e9876b9c Mon Sep 17 00:00:00 2001 From: ohga Date: Fri, 27 Feb 2015 15:22:49 +0900 Subject: [PATCH 28/65] =?UTF-8?q?=E3=82=AB=E3=83=AC=E3=83=B3=E3=83=80?= =?UTF-8?q?=E3=83=BC=E3=83=A1=E3=83=8B=E3=83=A5=E3=83=BC=E3=82=92=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA=E3=81=97=E3=81=A6=E3=81=84=E3=82=8B=E3=81=A8=E3=81=8D?= =?UTF-8?q?=E3=81=AB=E3=82=B9=E3=82=B1=E3=82=B8=E3=83=A5=E3=83=BC=E3=83=AB?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E3=81=AB=E3=81=97=E3=80=81=E6=99=82=E9=96=93?= =?UTF-8?q?=E9=A0=86=E2=87=94=E4=BC=9A=E5=93=A1=E9=A0=86=E3=82=92=E5=88=87?= =?UTF-8?q?=E3=82=8A=E6=9B=BF=E3=81=88=E3=82=8B=E3=81=A8javascript?= =?UTF-8?q?=E3=82=A8=E3=83=A9=E3=83=BC=E3=81=A8=E3=81=AA=E3=82=8B=E3=81=9F?= =?UTF-8?q?=E3=82=81=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit カレンダーメニューのポップアップを表示する ⇒ブロック右上の編集から表示方法を変更してスケジュール表示にして決定する ⇒時間順ー会員順を切り替える という操作をするとjavascriptエラーとなるため修正 また、不要な変数初期化を修正 --- .../modules/calendar/files/js/default/calendar.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) mode change 100644 => 100755 html/webapp/modules/calendar/files/js/default/calendar.js diff --git a/html/webapp/modules/calendar/files/js/default/calendar.js b/html/webapp/modules/calendar/files/js/default/calendar.js old mode 100644 new mode 100755 index a18397a..9953ff4 --- a/html/webapp/modules/calendar/files/js/default/calendar.js +++ b/html/webapp/modules/calendar/files/js/default/calendar.js @@ -633,21 +633,23 @@ clsCalendar.prototype = { if (!el) { switch (type) { case this.CALENDAR_YEARLY: - var el = $("calendar_yearly"+this.id); + el = $("calendar_yearly"+this.id); break; case this.CALENDAR_S_MONTHLY: - var el = $("calendar_s_monthly"+this.id); + el = $("calendar_s_monthly"+this.id); break; case this.CALENDAR_L_MONTHLY: - var el = $("calendar_l_monthly"+this.id); + el = $("calendar_l_monthly"+this.id); break; case this.CALENDAR_WEEKLY: - var el = $("calendar_weekly"+this.id); + el = $("calendar_weekly"+this.id); break; case this.CALENDAR_DAILY: - var el = $("calendar_daily"+this.id); + el = $("calendar_daily"+this.id); break; default: + // スケジュール表示の場合は処理終了 + return; } } if (!Element.hasClassName(el, "display-none")) { From 0d7d9f284246a171e682bde97f818b42af8a96a6 Mon Sep 17 00:00:00 2001 From: ohga Date: Tue, 3 Mar 2015 15:13:33 +0900 Subject: [PATCH 29/65] =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=83=9D=E3=83=BC?= =?UTF-8?q?=E3=83=88=E3=83=BB=E3=82=A8=E3=82=AF=E3=82=B9=E3=83=9D=E3=83=BC?= =?UTF-8?q?=E3=83=88=E3=83=BB=E3=83=80=E3=82=A6=E3=83=B3=E3=83=AD=E3=83=BC?= =?UTF-8?q?=E3=83=89=E6=99=82=E3=81=AB=E7=92=B0=E5=A2=83=E4=BE=9D=E5=AD=98?= =?UTF-8?q?=E6=96=87=E5=AD=97=E3=81=8C=E6=96=87=E5=AD=97=E5=8C=96=E3=81=91?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=81=9F=E3=82=81=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit インポートやエクスポート、IEでのファイルダウンロードで①や髙などの環境依存文字が文字化けするため「SJIS」ではなく「SJIS-win」に変換するように修正 [参考]http://fdays.blogspot.jp/2011/03/php-sjis-sjis-win.html --- html/webapp/components/csv/Main.class.php | 2 +- html/webapp/components/uploads/Action.class.php | 11 +---------- html/webapp/components/uploads/View.class.php | 2 +- html/webapp/config/define.inc.php | 10 ++++++++++ .../action/main/decompress/Decompress.class.php | 12 ++---------- .../modules/cabinet/components/Action.class.php | 10 +--------- .../validator/Validator_UploadCsv.class.php | 2 +- .../reservation/validator/Validator_Import.class.php | 5 ++--- .../room/view/admin/import/upload/Upload.class.php | 2 +- .../webapp/modules/user/components/Csvmain.class.php | 2 +- .../user/view/admin/import/upload/Upload.class.php | 6 +++--- 11 files changed, 24 insertions(+), 40 deletions(-) mode change 100644 => 100755 html/webapp/modules/cabinet/components/Action.class.php mode change 100644 => 100755 html/webapp/modules/room/view/admin/import/upload/Upload.class.php diff --git a/html/webapp/components/csv/Main.class.php b/html/webapp/components/csv/Main.class.php index 90c8b4c..4b6c544 100644 --- a/html/webapp/components/csv/Main.class.php +++ b/html/webapp/components/csv/Main.class.php @@ -60,7 +60,7 @@ class Csv_Main */ function Csv_Main() { $this->_LE = "\n"; - $this->charSet = "SJIS"; + $this->charSet = _CLIENT_OS_CHARSET; $this->mimeType = "document/unknown"; $this->division = ","; $this->extension = ".csv"; diff --git a/html/webapp/components/uploads/Action.class.php b/html/webapp/components/uploads/Action.class.php index fce1a68..8b28673 100644 --- a/html/webapp/components/uploads/Action.class.php +++ b/html/webapp/components/uploads/Action.class.php @@ -550,16 +550,7 @@ function _setFileByPath($set_path, &$files) { } function getEncode() { - if (stristr($_SERVER['HTTP_USER_AGENT'], "Mac")) { - // Macの場合 - $encode = "UTF-8"; - } else if (stristr($_SERVER['HTTP_USER_AGENT'], "Windows")) { - // Windowsの場合 - $encode = "SJIS"; - } else { - $encode = _CHARSET; - } - return $encode; + return _CLIENT_OS_CHARSET; } function setFileTemporaryPath($file_path) { diff --git a/html/webapp/components/uploads/View.class.php b/html/webapp/components/uploads/View.class.php index 1d3a916..d974e04 100755 --- a/html/webapp/components/uploads/View.class.php +++ b/html/webapp/components/uploads/View.class.php @@ -339,7 +339,7 @@ function _headerOutput($filename, $pathname, $filesize, $mimetype, $cache_flag = header("Content-disposition: inline; filename=\"".$filename."\""); } elseif (stristr($_SERVER['HTTP_USER_AGENT'], "MSIE") || stristr($_SERVER['HTTP_USER_AGENT'], "Trident")) { // IEの場合 - header("Content-disposition: inline; filename=\"".mb_convert_encoding($filename, "SJIS", _CHARSET)."\""); + header("Content-disposition: inline; filename=\"".mb_convert_encoding($filename, _CLIENT_OS_CHARSET, _CHARSET)."\""); } elseif (stristr($_SERVER['HTTP_USER_AGENT'], "Opera")) { // Operaの場合 header("Content-disposition: attachment; filename=\"".$filename."\""); diff --git a/html/webapp/config/define.inc.php b/html/webapp/config/define.inc.php index a4e3a1e..9ee87b0 100644 --- a/html/webapp/config/define.inc.php +++ b/html/webapp/config/define.inc.php @@ -3,6 +3,16 @@ define("_OFF",0); define('_CHARSET', 'UTF-8'); +if (stristr($_SERVER['HTTP_USER_AGENT'], 'Mac')) { + // Macの場合 + $encode = 'UTF-8'; +} else if (stristr($_SERVER['HTTP_USER_AGENT'], 'Windows')) { + // Windowsの場合 + $encode = 'SJIS-win'; +} else { + $encode = _CHARSET; +} +define('_CLIENT_OS_CHARSET', $encode); define("_SPACE_TYPE_UNDEFINED",0); //未定義 define("_SPACE_TYPE_PUBLIC",1); //パブリックスペース diff --git a/html/webapp/modules/cabinet/action/main/decompress/Decompress.class.php b/html/webapp/modules/cabinet/action/main/decompress/Decompress.class.php index 1aadbd2..edbf63f 100644 --- a/html/webapp/modules/cabinet/action/main/decompress/Decompress.class.php +++ b/html/webapp/modules/cabinet/action/main/decompress/Decompress.class.php @@ -32,16 +32,8 @@ class Cabinet_Action_Main_Decompress extends Action */ function execute() { - if (stristr($_SERVER['HTTP_USER_AGENT'], "Mac")) { - // Macの場合 - $this->cabinetAction->encode = "UTF-8"; - } else if (stristr($_SERVER['HTTP_USER_AGENT'], "Windows")) { - // Windowsの場合 - $this->cabinetAction->encode = "SJIS"; - } else { - $this->cabinetAction->encode = _CHARSET; - } - + $this->cabinetAction->encode = _CLIENT_OS_CHARSET; + $decompress_new_folder = $this->cabinetView->getDecompressNewFolder(); if ($decompress_new_folder == _ON) { diff --git a/html/webapp/modules/cabinet/components/Action.class.php b/html/webapp/modules/cabinet/components/Action.class.php old mode 100644 new mode 100755 index 8efcf8e..4bc51af --- a/html/webapp/modules/cabinet/components/Action.class.php +++ b/html/webapp/modules/cabinet/components/Action.class.php @@ -522,15 +522,7 @@ function compressFile() $archive_file_name = $upload_id; $this->archive_full_path = FILEUPLOADS_DIR."/".$file_path."/".$archive_file_name.".".$extension; - if (stristr($_SERVER['HTTP_USER_AGENT'], "Mac")) { - // Macの場合 - $this->encode = "UTF-8"; - } else if (stristr($_SERVER['HTTP_USER_AGENT'], "Windows")) { - // Windowsの場合 - $this->encode = "SJIS"; - } else { - $this->encode = _CHARSET; - } + $this->encode = _CLIENT_OS_CHARSET; if ($file["file_type"] == CABINET_FILETYPE_FOLDER) { $result = $this->_compressFile($file["file_id"], mb_convert_encoding($file["org_file_name"], $this->encode, "auto")."/"); diff --git a/html/webapp/modules/multidatabase/validator/Validator_UploadCsv.class.php b/html/webapp/modules/multidatabase/validator/Validator_UploadCsv.class.php index f1c42ce..d42a174 100644 --- a/html/webapp/modules/multidatabase/validator/Validator_UploadCsv.class.php +++ b/html/webapp/modules/multidatabase/validator/Validator_UploadCsv.class.php @@ -64,7 +64,7 @@ function validate($attributes, $errStr, $params) while (($data = $mdbAction->fgetcsv_reg($handle)) !== FALSE) { $num = count($data); for ($c=0; $c < $num; $c++) { - $data[$c] = mb_convert_encoding($data[$c], "UTF-8", "SJIS"); + $data[$c] = mb_convert_encoding($data[$c], "UTF-8", _CLIENT_OS_CHARSET); } $row_data[] = $data; } diff --git a/html/webapp/modules/reservation/validator/Validator_Import.class.php b/html/webapp/modules/reservation/validator/Validator_Import.class.php index b3ae981..f89fab6 100644 --- a/html/webapp/modules/reservation/validator/Validator_Import.class.php +++ b/html/webapp/modules/reservation/validator/Validator_Import.class.php @@ -61,7 +61,7 @@ function validate($attributes, $errStr, $params) } $header_format = explode("|", RESERVATION_IMPORT_FORMAT); foreach ($header_format as $i=>$val) { - if (mb_convert_encoding($row_csv_header[$i], "UTF-8", "SJIS") != $val) { + if (mb_convert_encoding($row_csv_header[$i], "UTF-8", _CLIENT_OS_CHARSET) != $val) { $uploadsAction->delUploadsById($filelist[0]["upload_id"]); return RESERVATION_ERR_FILE_FORMAT; } @@ -72,9 +72,8 @@ function validate($attributes, $errStr, $params) $import = array(); $duplication_time = array(); while (($data = $csvMain->fgets($handle)) !== FALSE) { - //SJISからUTF-8に変換 for ($c=0; $c$value) { - $ret[$index] = mb_convert_encoding($value, _CHARSET, 'SJIS'); + $ret[$index] = mb_convert_encoding($value, _CHARSET, _CLIENT_OS_CHARSET); } return $ret; } diff --git a/html/webapp/modules/user/components/Csvmain.class.php b/html/webapp/modules/user/components/Csvmain.class.php index 1d5dee0..b659066 100644 --- a/html/webapp/modules/user/components/Csvmain.class.php +++ b/html/webapp/modules/user/components/Csvmain.class.php @@ -25,7 +25,7 @@ class User_Components_Csvmain extends Csv_Main */ function User_Components_Csvmain() { $this->_LE = "\n"; - $this->charSet = "SJIS"; + $this->charSet = _CLIENT_OS_CHARSET; $this->mimeType = "document/unknown"; $this->division = ","; $this->extension = ".csv"; diff --git a/html/webapp/modules/user/view/admin/import/upload/Upload.class.php b/html/webapp/modules/user/view/admin/import/upload/Upload.class.php index 6b8bee9..e042580 100644 --- a/html/webapp/modules/user/view/admin/import/upload/Upload.class.php +++ b/html/webapp/modules/user/view/admin/import/upload/Upload.class.php @@ -86,7 +86,7 @@ function execute() // データ取得 // ヘッダチェック $row_data_headers = fgets($handle); - $row_data_headers = mb_convert_encoding($row_data_headers, "UTF-8", "SJIS"); + $row_data_headers = mb_convert_encoding($row_data_headers, "UTF-8", _CLIENT_OS_CHARSET); if (empty($row_data_headers)) { $errorList->add(get_class($this), sprintf(USER_IMPORT_UPLOAD_NODATA."(%s)", $filelist[0]['file_name'])); $this->_delImportFile($file); @@ -161,7 +161,7 @@ function execute() $items = null; $items_public = null; $items_reception = null; $row_data_user_str = fgets($handle); if (empty($row_data_user_str)) continue; - $row_data_user_str = mb_convert_encoding($row_data_user_str, "UTF-8", "SJIS"); + $row_data_user_str = mb_convert_encoding($row_data_user_str, "UTF-8", _CLIENT_OS_CHARSET); $row_data_user_str_len = strlen($row_data_user_str); $row_data_user = null; $row_data_user_str_idx = 0; @@ -183,7 +183,7 @@ function execute() while (!feof($handle) && empty($row_data_user_str)) { $row_data_user_str = fgets($handle); } - $row_data_user_str = mb_convert_encoding($row_data_user_str, "UTF-8", "SJIS"); + $row_data_user_str = mb_convert_encoding($row_data_user_str, "UTF-8", _CLIENT_OS_CHARSET); $row_data_user_str_len = strlen($row_data_user_str); $row_data_user_str_idx = 0; } else { From 2ff69faf412bfc175dbf0d904530ca548b7dbae2 Mon Sep 17 00:00:00 2001 From: ohga Date: Tue, 3 Mar 2015 15:37:46 +0900 Subject: [PATCH 30/65] =?UTF-8?q?#22=20=E6=97=A5=E6=95=B0=C3=9724=E6=99=82?= =?UTF-8?q?=E9=96=93=C3=9760=E5=88=86=C3=9760=E7=A7=92=E3=81=A7=E8=A8=88?= =?UTF-8?q?=E7=AE=97=E3=81=95=E3=82=8C=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/webapp/modules/cleanup/action/main/init/Init.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/html/webapp/modules/cleanup/action/main/init/Init.class.php b/html/webapp/modules/cleanup/action/main/init/Init.class.php index 50e1cb1..bad5d57 100644 --- a/html/webapp/modules/cleanup/action/main/init/Init.class.php +++ b/html/webapp/modules/cleanup/action/main/init/Init.class.php @@ -75,9 +75,10 @@ function _fileCleanUp($module, $module_name, $cleanup_params) $error_flag = false; $sum_data_count = 0; $file_exists_name_arr = array(); + $delayTime = _CLEANUP_DEL_DAY * 24 * 60 * 60; if(count($uploads) > 0) { foreach($uploads as $upload) { - if($upload['update_time'] >= date("YmdHis",timezone_date(null, true, "U") - _CLEANUP_DEL_DAY*60*60)) { + if($upload['update_time'] >= date("YmdHis",timezone_date(null, true, "U") - $delayTime)) { // ファイルが使用されていたものを配列に格納 $file_exists_name_arr[FILEUPLOADS_DIR.$upload['file_path'] . $upload['physical_file_name']] = true; $file_exists_name_arr[FILEUPLOADS_DIR.$upload['file_path'] .$upload['upload_id']."_thumbnail.".$upload['extension']] = true; From 2630b55e0c2a4a257a6892599b111ffc114e0d33 Mon Sep 17 00:00:00 2001 From: ohga Date: Tue, 3 Mar 2015 15:41:29 +0900 Subject: [PATCH 31/65] =?UTF-8?q?#43=20=E3=80=8Cby:=E3=80=8D=E3=82=92?= =?UTF-8?q?=E3=80=8Cby=20=E3=80=8D=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/webapp/modules/circular/language/chinese/main.ini | 2 +- html/webapp/modules/circular/language/english/main.ini | 2 +- html/webapp/modules/circular/language/japanese/main.ini | 2 +- html/webapp/modules/journal/language/english/main.ini | 4 ++-- html/webapp/modules/journal/language/japanese/main.ini | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/html/webapp/modules/circular/language/chinese/main.ini b/html/webapp/modules/circular/language/chinese/main.ini index 9466fb5..f5a46d7 100644 --- a/html/webapp/modules/circular/language/chinese/main.ini +++ b/html/webapp/modules/circular/language/chinese/main.ini @@ -54,7 +54,7 @@ circulr_mobile_reply = "Reply" circulr_mobile_show_reply = "Show reply list" [Circular_View_Main_Detail:Circular_View_Main_Postscript_Add] -circular_postscript_from = "by:" +circular_postscript_from = "by " [Circular_View_Main_Reply] circular_mobile_reply = "Reply" diff --git a/html/webapp/modules/circular/language/english/main.ini b/html/webapp/modules/circular/language/english/main.ini index 9466fb5..f5a46d7 100644 --- a/html/webapp/modules/circular/language/english/main.ini +++ b/html/webapp/modules/circular/language/english/main.ini @@ -54,7 +54,7 @@ circulr_mobile_reply = "Reply" circulr_mobile_show_reply = "Show reply list" [Circular_View_Main_Detail:Circular_View_Main_Postscript_Add] -circular_postscript_from = "by:" +circular_postscript_from = "by " [Circular_View_Main_Reply] circular_mobile_reply = "Reply" diff --git a/html/webapp/modules/circular/language/japanese/main.ini b/html/webapp/modules/circular/language/japanese/main.ini index 6a11205..e8352f6 100644 --- a/html/webapp/modules/circular/language/japanese/main.ini +++ b/html/webapp/modules/circular/language/japanese/main.ini @@ -54,7 +54,7 @@ circulr_mobile_reply = "回答する" circulr_mobile_show_reply = "回答一覧を見る" [Circular_View_Main_Detail:Circular_View_Main_Postscript_Add] -circular_postscript_from = "by:" +circular_postscript_from = "by " [Circular_View_Main_Reply] circular_mobile_reply = "回答する" diff --git a/html/webapp/modules/journal/language/english/main.ini b/html/webapp/modules/journal/language/english/main.ini index 7f284e4..3e5c836 100644 --- a/html/webapp/modules/journal/language/english/main.ini +++ b/html/webapp/modules/journal/language/english/main.ini @@ -32,11 +32,11 @@ journal_cat_add_title = "Add Category" journal_cat_name = "Category" journal_comment = "Comment" journal_cat_edit_readme = "You can edit the category by clicking it." -journal_from = "by:" +journal_from = "by " define:JOURNAL_NAME = "Journal" define:JOURNAL_NOCATEGORY = "Not specified" journal_nocategory = JOURNAL_NOCATEGORY -journal_add_user_title = "Posted by: %s" +journal_add_user_title = "Posted by %s" journal_mobile_post_category = "[Category]" journal_mobile_post_title = "[Title]" journal_mobile_post_date = "[Date]" diff --git a/html/webapp/modules/journal/language/japanese/main.ini b/html/webapp/modules/journal/language/japanese/main.ini index 615420b..bee5a56 100644 --- a/html/webapp/modules/journal/language/japanese/main.ini +++ b/html/webapp/modules/journal/language/japanese/main.ini @@ -32,7 +32,7 @@ journal_cat_add_title = "カテゴリを追加します。" journal_cat_name = "カテゴリ名" journal_comment = "コメント" journal_cat_edit_readme = "編集したいカテゴリ名は、クリックすると編集できます" -journal_from = "by:" +journal_from = "by " define:JOURNAL_NAME = "日誌" define:JOURNAL_NOCATEGORY = "カテゴリを指定しない" journal_nocategory = JOURNAL_NOCATEGORY From 3fd8889687fcc073f476c860c3527406309ae2f2 Mon Sep 17 00:00:00 2001 From: ohga Date: Tue, 3 Mar 2015 15:58:55 +0900 Subject: [PATCH 32/65] =?UTF-8?q?#51=20=E3=83=9A=E3=83=BC=E3=82=B8/?= =?UTF-8?q?=E3=82=B5=E3=82=A4=E3=83=88=E3=81=AE=E8=AA=AC=E6=98=8E=E2=87=92?= =?UTF-8?q?=E3=82=AD=E3=83=BC=E3=83=AF=E3=83=BC=E3=83=89=E3=81=AE=E9=A0=86?= =?UTF-8?q?=E3=81=AB=E7=B5=B1=E4=B8=80=E3=81=99=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/default/system_view_main_meta.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) mode change 100644 => 100755 html/webapp/modules/system/templates/default/system_view_main_meta.html diff --git a/html/webapp/modules/system/templates/default/system_view_main_meta.html b/html/webapp/modules/system/templates/default/system_view_main_meta.html old mode 100644 new mode 100755 index 5db812e..86cca45 --- a/html/webapp/modules/system/templates/default/system_view_main_meta.html +++ b/html/webapp/modules/system/templates/default/system_view_main_meta.html @@ -16,17 +16,17 @@ - + - -
<{$lang.system_meta_keywords_note|smarty:nodefaults}>
+ +
<{$lang.system_meta_description_note|smarty:nodefaults}>
- + - -
<{$lang.system_meta_description_note|smarty:nodefaults}>
+ +
<{$lang.system_meta_keywords_note|smarty:nodefaults}>
From c8fdcbd774fa41a880fe34899e2a4a479895124e Mon Sep 17 00:00:00 2001 From: ohga Date: Wed, 4 Mar 2015 11:03:34 +0900 Subject: [PATCH 33/65] =?UTF-8?q?#61=20=E4=BB=B6=E5=90=8D=E7=AD=89?= =?UTF-8?q?=E3=81=AE=E6=83=85=E5=A0=B1=E3=81=8C=E5=85=A5=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 日誌のコメント削除の他に、日誌のトラックバック削除も同様の現象があったため処理を共通化 --- .../action/main/comment/Comment.class.php | 8 +- .../action/main/confirm/Confirm.class.php | 22 +-- .../action/main/delete/Delete.class.php | 18 +-- .../journal/action/main/delete/maple.ini | 1 + .../main/deltrackback/Deltrackback.class.php | 22 +-- .../action/main/deltrackback/maple.ini | 2 +- .../journal/action/main/post/Post.class.php | 1 - .../journal/components/Action.class.php | 150 ++++-------------- 8 files changed, 57 insertions(+), 167 deletions(-) mode change 100644 => 100755 html/webapp/modules/journal/action/main/comment/Comment.class.php mode change 100644 => 100755 html/webapp/modules/journal/action/main/confirm/Confirm.class.php mode change 100644 => 100755 html/webapp/modules/journal/action/main/delete/Delete.class.php mode change 100644 => 100755 html/webapp/modules/journal/action/main/delete/maple.ini mode change 100644 => 100755 html/webapp/modules/journal/action/main/deltrackback/Deltrackback.class.php mode change 100644 => 100755 html/webapp/modules/journal/action/main/deltrackback/maple.ini mode change 100644 => 100755 html/webapp/modules/journal/action/main/post/Post.class.php mode change 100644 => 100755 html/webapp/modules/journal/components/Action.class.php diff --git a/html/webapp/modules/journal/action/main/comment/Comment.class.php b/html/webapp/modules/journal/action/main/comment/Comment.class.php old mode 100644 new mode 100755 index 2f18c1c..ffd3476 --- a/html/webapp/modules/journal/action/main/comment/Comment.class.php +++ b/html/webapp/modules/journal/action/main/comment/Comment.class.php @@ -47,7 +47,7 @@ function execute() }else { $agree_flag = JOURNAL_STATUS_AGREE_VALUE; } - + if(empty($this->comment_id)) { $params = array( "journal_id" => $this->journal_obj['journal_id'], @@ -75,8 +75,8 @@ function execute() if($result === false) { return 'error'; } - - if($comment_before_update[0]['agree_flag'] == JOURNAL_STATUS_WAIT_AGREE_VALUE && + + if($comment_before_update[0]['agree_flag'] == JOURNAL_STATUS_WAIT_AGREE_VALUE && $agree_flag == JOURNAL_STATUS_AGREE_VALUE && $this->journal_obj['comment_agree_mail_flag'] == _ON) { $this->session->setParameter("journal_confirm_mail_post_id", $this->comment_id); @@ -87,7 +87,7 @@ function execute() $this->session->setParameter("journal_mail_post_id", array("post_id" => $this->comment_id, "agree_flag" => JOURNAL_STATUS_WAIT_AGREE_VALUE)); } //--新着情報関連 Start-- - $result = $this->journalAction->setCommentWhatsnew($this->comment_id); + $result = $this->journalAction->setWhatsnew($this->post_id); if($result === false) { return 'error'; } diff --git a/html/webapp/modules/journal/action/main/confirm/Confirm.class.php b/html/webapp/modules/journal/action/main/confirm/Confirm.class.php old mode 100644 new mode 100755 index 560a6be..e69c586 --- a/html/webapp/modules/journal/action/main/confirm/Confirm.class.php +++ b/html/webapp/modules/journal/action/main/confirm/Confirm.class.php @@ -17,7 +17,7 @@ class Journal_Action_Main_Confirm extends Action // リクエストパラメータを受け取るため var $block_id = null; var $post_id = null; - + // バリデートによりセット var $journal_obj = null; @@ -27,19 +27,19 @@ class Journal_Action_Main_Confirm extends Action var $journalAction = null; // 値をセットするため - + /** * [[機能説明]] * * @access public */ function execute() - { + { $post_before_update = $this->db->selectExecute("journal_post", array("post_id" => $this->post_id)); if (empty($post_before_update)) { return 'error'; } - + $params = array( "agree_flag" => JOURNAL_STATUS_AGREE_VALUE ); @@ -52,28 +52,28 @@ function execute() if($this->journal_obj['mail_flag'] == _ON && empty($post_before_update[0]['parent_id'])) { $this->session->setParameter("journal_mail_post_id", array("post_id" => $this->post_id, "agree_flag" => JOURNAL_STATUS_AGREE_VALUE)); } - - if((empty($post_before_update[0]['parent_id']) && $this->journal_obj['agree_mail_flag'] == _ON) + + if((empty($post_before_update[0]['parent_id']) && $this->journal_obj['agree_mail_flag'] == _ON) || (!empty($post_before_update[0]['parent_id']) && $this->journal_obj['comment_agree_mail_flag'] == _ON && (empty($post_before_update[0]['direction_flag']) || (!empty($post_before_update[0]['direction_flag']) && strpos($post_before_update[0]['tb_url'], BASE_URL) !== false)))) { $this->session->setParameter("journal_confirm_mail_post_id", $this->post_id); } - + //トラックバックの処理 $this->journalAction->setTrackBack($this->journal_obj, $this->post_id, $post_before_update[0]); - + //--新着情報関連 Start-- if(empty($post_before_update[0]['parent_id'])) { $result = $this->journalAction->setWhatsnew($this->post_id); }else { - $result = $this->journalAction->setCommentWhatsnew($this->post_id); + $result = $this->journalAction->setWhatsnew($post_before_update[0]['parent_id']); } if($result === false) { return 'error'; } //--新着情報関連 End-- - + // --- 投稿回数更新 --- - + $before_post = isset($post_before_update[0]) ? $post_before_update[0] : null; $result = $this->journalAction->setMonthlynumber(_ON, JOURNAL_POST_STATUS_REREASED_VALUE, $before_post['status'], $before_post); if ($result === false) { diff --git a/html/webapp/modules/journal/action/main/delete/Delete.class.php b/html/webapp/modules/journal/action/main/delete/Delete.class.php old mode 100644 new mode 100755 index e5c0617..b6707ff --- a/html/webapp/modules/journal/action/main/delete/Delete.class.php +++ b/html/webapp/modules/journal/action/main/delete/Delete.class.php @@ -24,6 +24,7 @@ class Journal_Action_Main_Delete extends Action var $session = null; var $whatsnewAction = null; var $request = null; + var $journalAction = null; // 値をセットするため var $comment_flag = null; @@ -79,23 +80,10 @@ function execute() } } else { // コメント削除 - $count = $this->db->countExecute("journal_post", array("parent_id"=>$this->post_id)); - if ($count === false) { + $result = $this->journalAction->setWhatsnew($this->post_id); + if($result === false) { return 'error'; } - if($count == 0) { - $result = $this->whatsnewAction->delete($this->post_id, _ON); - } else { - $whatsnew = array( - "unique_id" => $this->post_id, - "count_num" => $count, - "child_flag" => _ON - ); - $result = $this->whatsnewAction->auto($whatsnew); - if($result === false) { - return 'error'; - } - } } //--新着情報関連 End-- diff --git a/html/webapp/modules/journal/action/main/delete/maple.ini b/html/webapp/modules/journal/action/main/delete/maple.ini old mode 100644 new mode 100755 index 667e6af..8239f4e --- a/html/webapp/modules/journal/action/main/delete/maple.ini +++ b/html/webapp/modules/journal/action/main/delete/maple.ini @@ -16,6 +16,7 @@ comment_id.journal.commentEditAuth:g = "1:lang._invalid_auth" session = "ref:Session" whatsnewAction = "ref:whatsnewAction" request = "ref:Request" +journalAction = "ref:journalAction" [View] post = "location_script:" diff --git a/html/webapp/modules/journal/action/main/deltrackback/Deltrackback.class.php b/html/webapp/modules/journal/action/main/deltrackback/Deltrackback.class.php old mode 100644 new mode 100755 index 9a0519c..f6d119d --- a/html/webapp/modules/journal/action/main/deltrackback/Deltrackback.class.php +++ b/html/webapp/modules/journal/action/main/deltrackback/Deltrackback.class.php @@ -23,7 +23,7 @@ class Journal_Action_Main_Deltrackback extends Action // 使用コンポーネントを受け取るため var $db = null; - var $whatsnewAction = null; + var $journalAction = null; // 値をセットするため @@ -44,26 +44,10 @@ function execute() } //--新着情報関連 Start-- - $count = $this->db->countExecute("journal_post", array("parent_id"=>$this->post_id, "direction_flag != " . JOURNAL_TRACKBACK_TRANSMIT => null)); - if ($count === false) { + $result = $this->journalAction->setWhatsnew($this->post_id); + if($result === false) { return 'error'; } - if($this->post['agree_flag'] != JOURNAL_STATUS_AGREE_VALUE) { - $whatsnew = array( - "unique_id" => $this->post_id, - "count_num" => $count, - "child_flag" => _ON - ); - $result = $this->whatsnewAction->auto($whatsnew); - if($result === false) { - return 'error'; - } - }else { - if($count == 0) { - $result = $this->whatsnewAction->delete($this->post_id, _ON); - } - } - //--新着情報関連 End-- return 'success'; diff --git a/html/webapp/modules/journal/action/main/deltrackback/maple.ini b/html/webapp/modules/journal/action/main/deltrackback/maple.ini old mode 100644 new mode 100755 index c88163f..6342291 --- a/html/webapp/modules/journal/action/main/deltrackback/maple.ini +++ b/html/webapp/modules/journal/action/main/deltrackback/maple.ini @@ -9,7 +9,7 @@ trackback_id.journal.existTrackback:g = "1:lang._invalid_input" key:trackback_id.journal.postEditAuth:g = "1:lang._invalid_auth" [Action] -whatsnewAction = "ref:whatsnewAction" +journalAction = "ref:journalAction" [View] success = "action:journal_view_main_detail" diff --git a/html/webapp/modules/journal/action/main/post/Post.class.php b/html/webapp/modules/journal/action/main/post/Post.class.php old mode 100644 new mode 100755 index 0720322..038d946 --- a/html/webapp/modules/journal/action/main/post/Post.class.php +++ b/html/webapp/modules/journal/action/main/post/Post.class.php @@ -41,7 +41,6 @@ class Journal_Action_Main_Post extends Action var $journalView = null; var $journalAction = null; var $db = null; - var $whatsnewAction = null; var $request = null; var $session = null; var $configView = null; diff --git a/html/webapp/modules/journal/components/Action.class.php b/html/webapp/modules/journal/components/Action.class.php old mode 100644 new mode 100755 index c16b546..48ddb7d --- a/html/webapp/modules/journal/components/Action.class.php +++ b/html/webapp/modules/journal/components/Action.class.php @@ -234,41 +234,13 @@ function saveTrackback($trackback) { return false; } $block_id = isset($journal_block[0]) ? $journal_block[0]['block_id'] : 0; - $count = $this->_db->countExecute("journal_post", array("parent_id"=>$trackback['post_id'], "direction_flag != " . JOURNAL_TRACKBACK_TRANSMIT => null)); - if ($count === false) { + $commonMain =& $this->_container->getComponent("commonMain"); + $parameters = "post_id=". $trackback['post_id'] . "&trackback_flag=1&block_id=".$block_id."#".$commonMain->getTopId($block_id); + + $result = $this->setWhatsnew($trackback['post_id'], $parameters); + if ($result === false) { return false; } - if($agree_flag == JOURNAL_STATUS_AGREE_VALUE) { - $commonMain =& $this->_container->getComponent("commonMain"); - $time = timezone_date(); - if(intval($time) < intval($post[0]['journal_date'])) { - // 未来ならば、日誌の記事の時間をセット - $time = $post[0]['journal_date']; - } - $whatsnew = array( - "unique_id" => $trackback['post_id'], - "title" => $post[0]['title'], - "description" => $post[0]['content'], - "action_name" => "journal_view_main_detail", - "parameters" => "post_id=". $trackback['post_id'] . "&trackback_flag=1&block_id=".$block_id."#".$commonMain->getTopId($block_id), - "count_num" => $count, - "child_flag" => _ON, - "room_id" => $post[0]['room_id'], - "insert_time" => $time, - "insert_user_id" => $post[0]['insert_user_id'], - "insert_user_name" => $post[0]['insert_user_name'] - ); - $whatsnewAction =& $this->_container->getComponent("whatsnewAction"); - $result = $whatsnewAction->auto($whatsnew, _ON); - if($result === false) { - return false; - } - }else { - if($count == 0) { - $result = $whatsnewAction->delete($trackback['post_id'], _ON); - } - } - //--新着情報関連 End-- }else { @@ -481,7 +453,7 @@ function getWeblogMsg(){ * @return bool * @access public */ - function setWhatsnew($post_id) { + function setWhatsnew($post_id, $parameters="") { $params = array("post_id" => $post_id); $posts = $this->_db->selectExecute("journal_post", $params); @@ -492,46 +464,47 @@ function setWhatsnew($post_id) { $whatsnewAction =& $this->_container->getComponent("whatsnewAction"); if ($posts[0]["status"] == JOURNAL_POST_STATUS_REREASED_VALUE && $posts[0]["agree_flag"] == JOURNAL_STATUS_AGREE_VALUE) { + $commentParams = array( + "parent_id" => $post_id, + "direction_flag != " . JOURNAL_TRACKBACK_TRANSMIT => null, + "agree_flag" => JOURNAL_STATUS_AGREE_VALUE + ); + $count = $this->_db->countExecute("journal_post", $commentParams); + if ($count === false) { + return false; + } + + $time = timezone_date(); + if ($time < $posts[0]['journal_date'] || $count == 0) { + // 未来記事もしくは子記事が無いならば、日誌の記事の時間をセット + $child_update_time = $posts[0]['journal_date']; + } else { + //過去(現在)ならば、コメントのMAX日時と日誌の記事の日時の大きい方をセット + $child_update_time = $this->_db->maxExecute("journal_post", "insert_time", $commentParams); + if ($child_update_time < $posts[0]['journal_date']) { + $child_update_time = $posts[0]['journal_date']; + } + } + if ($parameters == "") { + $parameters = "post_id=". $post_id . "&comment_flag=1"; + } $whatsnew = array( "unique_id" => $post_id, "title" => $posts[0]["title"], "description" => $posts[0]["content"]."

".$posts[0]["more_content"], "action_name" => "journal_view_main_detail", - "parameters" => "post_id=". $post_id . "&comment_flag=1", + "parameters" => $parameters, "insert_time" => $posts[0]["journal_date"], "insert_user_id" => $posts[0]["insert_user_id"], "insert_user_name" => $posts[0]["insert_user_name"], - "update_time" => $posts[0]["journal_date"], - "child_update_time" => $posts[0]["journal_date"] + "count_num" => $count, + "child_update_time" => $child_update_time, + "room_id" => $posts[0]['room_id'], ); $result = $whatsnewAction->auto($whatsnew); if ($result === false) { return false; } - - // journal_dateが、未来かどうかを判断し、 - // 未来ならば、コメントの新着も未来に書き換え - // 未来でなければ、コメントのデータのMAXをとり、 - // その日付に更新 - $where_params = array( - "root_id" => $post_id - ); - $insert_time = $this->_db->maxExecute("journal_post", "insert_time", $where_params); - if(isset($insert_time)) { - // コメントあり - $time = timezone_date(); - $journal_date = $posts[0]["journal_date"]; - $whatsnew['child_flag'] = _ON; - if(intval($journal_date) < intval($time)) { - // 過去 - $whatsnew['insert_time'] = $journal_date; - $whatsnew['child_update_time'] = $insert_time; - } - $result = $whatsnewAction->auto($whatsnew, _OFF); - if ($result === false) { - return false; - } - } } else { $result = $whatsnewAction->delete($post_id); if($result === false) { @@ -541,61 +514,6 @@ function setWhatsnew($post_id) { return true; } - /** - * 新着情報にセットする(コメント) - * - * @return bool - * @access public - */ - function setCommentWhatsnew($comment_id) { - $params = array("post_id" => $comment_id); - $comment = $this->_db->selectExecute("journal_post", $params); - if (empty($comment)) { - return false; - } - $whatsnewAction =& $this->_container->getComponent("whatsnewAction"); - $count = $this->_db->countExecute("journal_post", array("parent_id"=>$comment[0]['parent_id'], "direction_flag != " . JOURNAL_TRACKBACK_TRANSMIT => null)); - if ($count === false) { - return false; - } - - if ($comment[0]["agree_flag"] == JOURNAL_STATUS_AGREE_VALUE) { - $journal_post = $this->_db->selectExecute("journal_post", array("post_id"=>$comment[0]['parent_id'])); - if ($journal_post === false && !isset($journal_post[0])) { - return false; - } - $time = timezone_date(); - if(intval($time) < intval($journal_post[0]['journal_date'])) { - // 未来ならば、日誌の記事の時間をセット - $time = $journal_post[0]['journal_date']; - } - - $whatsnew = array( - "unique_id" => $comment[0]['parent_id'], - "title" => $journal_post[0]['title'], - "description" => $journal_post[0]['content'], - "action_name" => "journal_view_main_detail", - "parameters" => "post_id=". $comment[0]['parent_id'] . "&comment_flag=1", - "count_num" => $count, - "child_flag" => _ON, - "child_update_time" => $time, - "insert_time" => $journal_post[0]['journal_date'], - "insert_user_id" => $journal_post[0]['insert_user_id'], - "insert_user_name" => $journal_post[0]['insert_user_name'] - ); - $result = $whatsnewAction->auto($whatsnew); - if($result === false) { - return false; - } - }else { - if($count == 0) { - $result = $whatsnewAction->delete($comment[0]['parent_id'], _ON); - } - } - - return true; - } - /** * 投稿回数をセットする * From 3938905be19083df103279e627cbf0a5f270115a Mon Sep 17 00:00:00 2001 From: ohga Date: Wed, 4 Mar 2015 11:04:42 +0900 Subject: [PATCH 34/65] =?UTF-8?q?#61=20=E6=B1=8E=E7=94=A8DB=E3=81=AE?= =?UTF-8?q?=E3=82=B3=E3=83=A1=E3=83=B3=E3=83=88=E5=89=8A=E9=99=A4=E3=82=82?= =?UTF-8?q?=E5=90=8C=E6=A7=98=E3=81=AE=E4=B8=8D=E5=85=B7=E5=90=88=E3=81=8C?= =?UTF-8?q?=E3=81=82=E3=82=8B=E3=81=9F=E3=82=81=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/delcomment/Delcomment.class.php | 21 +++++++++++++++++++ .../action/main/delcomment/maple.ini | 1 + 2 files changed, 22 insertions(+) diff --git a/html/webapp/modules/multidatabase/action/main/delcomment/Delcomment.class.php b/html/webapp/modules/multidatabase/action/main/delcomment/Delcomment.class.php index 95ac94f..5e4bac2 100644 --- a/html/webapp/modules/multidatabase/action/main/delcomment/Delcomment.class.php +++ b/html/webapp/modules/multidatabase/action/main/delcomment/Delcomment.class.php @@ -21,6 +21,7 @@ class Multidatabase_Action_Main_Delcomment extends Action // 使用コンポーネントを受け取るため var $db = null; var $whatsnewAction = null; + var $mdbAction = null; // バリデートによりセットするため @@ -45,8 +46,28 @@ function execute() if($count == 0) { $result = $this->whatsnewAction->delete($this->content_id, _ON); } else { + $params = array(); + $whereParams = array('content_id' => $this->content_id); + $sql = "SELECT M.multidatabase_id, M.title_metadata_id " + . "FROM {multidatabase_content} MC " + . "INNER JOIN {multidatabase} M " + . "ON MC.multidatabase_id = M.multidatabase_id" + . $this->db->getWhereSQL($params, $whereParams); + $multidatabase = $this->db->execute($sql, $params); + if (empty($multidatabase)) { + return 'error'; + } + + $whatsnewTitle = $this->mdbAction->getWhatsnewTitle($this->content_id, $multidatabase[0]['title_metadata_id']); + if ($whatsnewTitle === false) { + return 'error'; + } $whatsnew = array( "unique_id" => $this->content_id, + "title" => $whatsnewTitle["title"], + "description" => $whatsnewTitle["description"], + "action_name" => "multidatabase_view_main_detail", + "parameters" => "content_id=". $this->content_id . "&multidatabase_id=" . $multidatabase[0]["multidatabase_id"], "count_num" => $count, "child_flag" => _ON ); diff --git a/html/webapp/modules/multidatabase/action/main/delcomment/maple.ini b/html/webapp/modules/multidatabase/action/main/delcomment/maple.ini index 52b4ddb..442d754 100644 --- a/html/webapp/modules/multidatabase/action/main/delcomment/maple.ini +++ b/html/webapp/modules/multidatabase/action/main/delcomment/maple.ini @@ -10,6 +10,7 @@ comment_id.multidatabase.commentExists="1:lang._invalid_input" [Action] whatsnewAction = "ref:whatsnewAction" +mdbAction = "ref:mdbAction" [View] success = "action:multidatabase_view_main_detail" From db0fe700adda1a3a0d9fc1ce3c1ee9023923f847 Mon Sep 17 00:00:00 2001 From: ohga Date: Wed, 4 Mar 2015 11:10:03 +0900 Subject: [PATCH 35/65] =?UTF-8?q?#65=20=E3=83=AD=E3=82=B0=E3=82=A4?= =?UTF-8?q?=E3=83=B3=E3=81=97=E3=81=A6=E3=81=84=E3=81=AA=E3=81=84=E3=81=A8?= =?UTF-8?q?=E6=A4=9C=E7=B4=A2=E3=83=A2=E3=82=B8=E3=83=A5=E3=83=BC=E3=83=AB?= =?UTF-8?q?=E3=81=AE=E6=A4=9C=E7=B4=A2=E3=81=A7=E3=82=A8=E3=83=A9=E3=83=BC?= =?UTF-8?q?=E3=81=8C=E7=99=BA=E7=94=9F=E3=81=99=E3=82=8B=E3=81=9F=E3=82=81?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../validator/Validator_UserAuthCheck.class.php | 11 +++++------ .../circular/view/admin/search/Search.class.php | 7 +++---- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/html/webapp/modules/circular/validator/Validator_UserAuthCheck.class.php b/html/webapp/modules/circular/validator/Validator_UserAuthCheck.class.php index e47b1e1..9b7d243 100644 --- a/html/webapp/modules/circular/validator/Validator_UserAuthCheck.class.php +++ b/html/webapp/modules/circular/validator/Validator_UserAuthCheck.class.php @@ -24,18 +24,17 @@ class Circular_Validator_UserAuthCheck extends Validator function validate($attributes, $errStr, $params) { $container =& DIContainerFactory::getContainer(); - $session =& $container->getComponent('Session'); - - if (!$session->getParameter('_user_id')) { - return $errStr; - } - $actionChain =& $container->getComponent('ActionChain'); $actionName = $actionChain->getCurActionName(); if ($actionName == "circular_view_admin_search") { return; } + $session =& $container->getComponent('Session'); + if (!$session->getParameter('_user_id')) { + return $errStr; + } + if ($session->getParameter('_auth_id') < _AUTH_GENERAL) { $filterChain =& $container->getComponent('FilterChain'); $smartyAssign =& $filterChain->getFilterByName('SmartyAssign'); diff --git a/html/webapp/modules/circular/view/admin/search/Search.class.php b/html/webapp/modules/circular/view/admin/search/Search.class.php index 9c01117..c42a15a 100644 --- a/html/webapp/modules/circular/view/admin/search/Search.class.php +++ b/html/webapp/modules/circular/view/admin/search/Search.class.php @@ -40,15 +40,14 @@ class Circular_View_Admin_Search extends Action */ function execute() { - if ($this->block_id_arr) { - $sqlwhere = ' WHERE block.block_id IN ('.implode(',', $this->block_id_arr).')'; - } else { + $user_id = $this->session->getParameter('_user_id'); + if ($user_id === '0' || $user_id === null || !$this->block_id_arr) { return 'success'; } + $sqlwhere = ' WHERE block.block_id IN ('.implode(',', $this->block_id_arr).')'; $sqlwhere .= $this->sqlwhere; $sqlwhere .= ' AND (circular.post_user_id = ? OR user.receive_user_id = ?)'; - $user_id = $this->session->getParameter('_user_id'); $this->params[] = $user_id; $this->params[] = $user_id; From 8a67ec8f3e7b13f726f41aa2f3f496a2f2491b4e Mon Sep 17 00:00:00 2001 From: ohga Date: Wed, 4 Mar 2015 12:36:30 +0900 Subject: [PATCH 36/65] =?UTF-8?q?#66=2012/31=E3=81=AE=E5=B9=B4=E5=8D=98?= =?UTF-8?q?=E4=BD=8D=E3=81=AE=E7=B9=B0=E3=82=8A=E8=BF=94=E3=81=97=E3=81=8C?= =?UTF-8?q?=E6=AD=A3=E5=B8=B8=E3=81=AB=E7=99=BB=E9=8C=B2=E3=81=95=E3=82=8C?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/calendar/Action.class.php | 30 +++++++++++++------ 1 file changed, 21 insertions(+), 9 deletions(-) mode change 100644 => 100755 html/webapp/components/calendar/Action.class.php diff --git a/html/webapp/components/calendar/Action.class.php b/html/webapp/components/calendar/Action.class.php old mode 100644 new mode 100755 index a96a882..84a9a46 --- a/html/webapp/components/calendar/Action.class.php +++ b/html/webapp/components/calendar/Action.class.php @@ -713,6 +713,7 @@ function _insertYearly($params, &$rrule, $first=false, $bymonthday=0) $bymonthday = intval(substr($start_date,6,2)); } + $result = true; $current_month = intval(substr($start_date,4,2)); foreach ($rrule["BYMONTH"] as $i=>$month) { if ($first && $current_month > $month) { continue; } @@ -724,7 +725,8 @@ function _insertYearly($params, &$rrule, $first=false, $bymonthday=0) } else { $params["start_date"] = substr($start_date,0,4).sprintf("%02d",$month)."01"; $params["start_time"] = $start_time; - $params["end_date"] = substr($end_date,0,4).sprintf("%02d",$month).sprintf("%02d", 1 + $diff_num); + // end_dateにはstart_date + $diff_numの日付をセット(12/31の場合に翌年がセットされるため) + $params["end_date"] = substr($start_date,0,4) . sprintf("%02d", $month) . sprintf("%02d", 1 + $diff_num); $params["end_time"] = $end_time; } if (!empty($rrule["BYDAY"]) && count($rrule["BYDAY"]) > 0) { @@ -736,10 +738,16 @@ function _insertYearly($params, &$rrule, $first=false, $bymonthday=0) return false; } } - $params["start_date"] = timezone_date($start_date.$start_time, true, "Ymd"); - $params["start_time"] = timezone_date($start_date.$start_time, true, "His"); - $params["end_date"] = timezone_date($end_date.$end_time, true, "Ymd"); - $params["end_time"] = timezone_date($end_date.$end_time, true, "His"); + $startDate = $start_date.$start_time; + $endDate = $end_date.$end_time; + if (is_array($result)) { + list($startDate, $endDate) = $result; + } + + $params["start_date"] = timezone_date($startDate, true, "Ymd"); + $params["start_time"] = timezone_date($startDate, true, "His"); + $params["end_date"] = timezone_date($endDate, true, "Ymd"); + $params["end_time"] = timezone_date($endDate, true, "His"); if (!empty($rrule["BYDAY"]) && count($rrule["BYDAY"]) > 0) { return $this->_insertYearly($params, $rrule); @@ -749,8 +757,10 @@ function _insertYearly($params, &$rrule, $first=false, $bymonthday=0) } /** - * 登録処理 + * 登録処理(年単位-開始日と同日) * + * @return mixed boolean true:登録せず終了 false:失敗 + * array 登録成功: array(登録した開始年月日時分秒, 登録した終了年月日時分秒) * @access private */ function __insertYearlyByMonthday($params, &$rrule, $bymonthday, $first) @@ -798,13 +808,15 @@ function __insertYearlyByMonthday($params, &$rrule, $bymonthday, $first) if ($calendar_id === false) { return false; } else { - return true; + return array($start_date.$start_time, $end_date.$end_time); } } /** - * 登録処理 + * 登録処理(年単位-第○週○曜日) * + * @return mixed boolean true:登録せず終了 false:失敗 + * array 登録成功: array(登録した開始年月日時分秒, 登録した終了年月日時分秒) * @access private */ function __insertYearlyByday($params, &$rrule, $first=false) @@ -862,7 +874,7 @@ function __insertYearlyByday($params, &$rrule, $first=false) if ($calendar_id === false) { return false; } else { - return true; + return array($start_date.$start_time, $end_date.$end_time); } } From d12bd2c451ce542b5f80db84425c0a1f4ae31048 Mon Sep 17 00:00:00 2001 From: ohga Date: Wed, 4 Mar 2015 12:38:58 +0900 Subject: [PATCH 37/65] =?UTF-8?q?#81=20=E9=87=8D=E8=A4=87=E3=81=97?= =?UTF-8?q?=E3=81=A6=E3=81=84=E3=82=8B=E6=9D=A1=E4=BB=B6=E5=BC=8F=E3=82=92?= =?UTF-8?q?=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../default/multidatabase_mobile_metadata_detail_feature.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/webapp/modules/multidatabase/templates/default/multidatabase_mobile_metadata_detail_feature.html b/html/webapp/modules/multidatabase/templates/default/multidatabase_mobile_metadata_detail_feature.html index 01e3c56..b13c76f 100644 --- a/html/webapp/modules/multidatabase/templates/default/multidatabase_mobile_metadata_detail_feature.html +++ b/html/webapp/modules/multidatabase/templates/default/multidatabase_mobile_metadata_detail_feature.html @@ -8,7 +8,7 @@ <{/if}> -<{if $metadata.type == $smarty.const.MULTIDATABASE_META_TYPE_TEXT || $metadata.type == MULTIDATABASE_META_TYPE_MAIL || $metadata.type == MULTIDATABASE_META_TYPE_MAIL}> +<{if $metadata.type == $smarty.const.MULTIDATABASE_META_TYPE_TEXT || $metadata.type == MULTIDATABASE_META_TYPE_MAIL}> <{* テキスト *}>
From 7c8034951c71bb9ec8ff87bff5f22a4557790670 Mon Sep 17 00:00:00 2001 From: ohga Date: Wed, 4 Mar 2015 13:01:38 +0900 Subject: [PATCH 38/65] =?UTF-8?q?#82=20text=E3=81=AE=E3=83=87=E3=83=BC?= =?UTF-8?q?=E3=82=BF=E5=9E=8B=E3=81=AEDefault=E6=8C=87=E5=AE=9A=E3=82=92?= =?UTF-8?q?=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/webapp/modules/circular/sql/mysql/table.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/webapp/modules/circular/sql/mysql/table.sql b/html/webapp/modules/circular/sql/mysql/table.sql index 39f8356..cdd7715 100644 --- a/html/webapp/modules/circular/sql/mysql/table.sql +++ b/html/webapp/modules/circular/sql/mysql/table.sql @@ -87,7 +87,7 @@ CREATE TABLE `circular_config` ( `room_id` int(11) NOT NULL default '0', `create_authority` tinyint(1) NOT NULL default '0', `mail_subject` varchar(255) default '', - `mail_body` text NOT NULL default '', + `mail_body` text NOT NULL, `insert_time` varchar(14) NOT NULL default '', `insert_site_id` varchar(40) NOT NULL default '', `insert_user_id` varchar(40) NOT NULL default '', From 99f1af6db4f37b39e9a24634af8b351bd08caca8 Mon Sep 17 00:00:00 2001 From: ohga Date: Wed, 4 Mar 2015 15:15:33 +0900 Subject: [PATCH 39/65] =?UTF-8?q?#101=20YouTube=E3=81=AE=E5=9F=8B=E3=82=81?= =?UTF-8?q?=E8=BE=BC=E3=81=BF=E3=82=B3=E3=83=BC=E3=83=89=E3=81=AEURL?= =?UTF-8?q?=E3=81=8C=E3=80=8Chttps=E3=80=8D=E3=81=A8=E3=81=AA=E3=81=A3?= =?UTF-8?q?=E3=81=9F=E3=81=9F=E3=82=81=E8=A8=B1=E5=8F=AF=E3=81=99=E3=82=8B?= =?UTF-8?q?URL=E3=81=AB=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../install/sql/mysql/default/common_insert.data.php | 2 ++ html/webapp/modules/module/update/Update.class.php | 12 ++++++++++++ 2 files changed, 14 insertions(+) mode change 100644 => 100755 html/webapp/modules/install/sql/mysql/default/common_insert.data.php mode change 100644 => 100755 html/webapp/modules/module/update/Update.class.php diff --git a/html/webapp/modules/install/sql/mysql/default/common_insert.data.php b/html/webapp/modules/install/sql/mysql/default/common_insert.data.php old mode 100644 new mode 100755 index 4721387..91f1d93 --- a/html/webapp/modules/install/sql/mysql/default/common_insert.data.php +++ b/html/webapp/modules/install/sql/mysql/default/common_insert.data.php @@ -560,6 +560,8 @@ INSERT INTO `textarea_video_url` (`url`, `action_name`, `insert_time`, `insert_site_id`, `insert_user_id`, `insert_user_name`, `update_time`, `update_site_id`, `update_user_id`, `update_user_name`) VALUES ('', 'multimedia_view_main_play', '', '', '0', '', '', '', '0', ''); INSERT INTO `textarea_video_url` (`url`, `action_name`, `insert_time`, `insert_site_id`, `insert_user_id`, `insert_user_name`, `update_time`, `update_site_id`, `update_user_id`, `update_user_name`) VALUES ('http://www.youtube-nocookie.com/', '', '', '', '0', '', '', '', '0', ''); INSERT INTO `textarea_video_url` (`url`, `action_name`, `insert_time`, `insert_site_id`, `insert_user_id`, `insert_user_name`, `update_time`, `update_site_id`, `update_user_id`, `update_user_name`) VALUES ('//www.youtube.com/', '', '', '', '0', '', '', '', '0', ''); +INSERT INTO `textarea_video_url` (`url`, `action_name`, `insert_time`, `insert_site_id`, `insert_user_id`, `insert_user_name`, `update_time`, `update_site_id`, `update_user_id`, `update_user_name`) VALUES ('https://www.youtube.com/', '', '', '', '0', '', '', '', '0', ''); +INSERT INTO `textarea_video_url` (`url`, `action_name`, `insert_time`, `insert_site_id`, `insert_user_id`, `insert_user_name`, `update_time`, `update_site_id`, `update_user_id`, `update_user_name`) VALUES ('https://www.youtube-nocookie.com/', '', '', '', '0', '', '', '', '0', ''); "; ?> \ No newline at end of file diff --git a/html/webapp/modules/module/update/Update.class.php b/html/webapp/modules/module/update/Update.class.php old mode 100644 new mode 100755 index 47dfa31..21f297f --- a/html/webapp/modules/module/update/Update.class.php +++ b/html/webapp/modules/module/update/Update.class.php @@ -504,6 +504,18 @@ function execute() } } + // WYSIWYGの許可するVideoURLに「https://www.youtube.com/」「https://www.youtube-nocookie.com/」を追加 + $textarea_video_url = $this->db->selectExecute("textarea_video_url", array("url"=> 'https://www.youtube.com/')); + if($textarea_video_url !== false && count($textarea_video_url) == 0) { + $sql = "INSERT INTO `".$this->db->getPrefix()."textarea_video_url` (`url`, `action_name`, `insert_time`, `insert_site_id`, `insert_user_id`, `insert_user_name`, `update_time`, `update_site_id`, `update_user_id`, `update_user_name`) VALUES + ('https://www.youtube.com/', '', '', '', '0', '', '', '', '0', ''), + ('https://www.youtube-nocookie.com/', '', '', '', '0', '', '', '', '0', '')"; + $result = $this->db->execute($sql); + if ($result === false) { + return false; + } + } + // WYSIWYGの許可するタグに「em」,「i」,「strike」,「s」を追加 $textarea_tag = $this->db->selectExecute("textarea_tag", array("tag"=> 'em')); if($textarea_tag !== false && count($textarea_tag) == 0) { From 8ead773e68d4e8c9b442bc872a615280499faf06 Mon Sep 17 00:00:00 2001 From: ohga Date: Wed, 4 Mar 2015 18:37:32 +0900 Subject: [PATCH 40/65] =?UTF-8?q?XAMPP=E3=81=AE=E5=A0=B4=E5=90=88=E3=80=81?= =?UTF-8?q?fopen=E3=81=97=E3=81=9F=E5=BE=8C=E3=81=ABfclose=E3=81=9B?= =?UTF-8?q?=E3=81=9Aunlink=E3=81=99=E3=82=8B=E3=81=A8warning=E3=81=8C?= =?UTF-8?q?=E7=99=BA=E7=94=9F=E3=81=99=E3=82=8B=E4=B8=8D=E5=85=B7=E5=90=88?= =?UTF-8?q?=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [参考] http://d.hatena.ne.jp/sutara_lumpur/20120715/1342330181 --- .../validator/Validator_Import.class.php | 6 ++++ .../view/admin/import/upload/Upload.class.php | 36 ++++++++++--------- .../view/admin/import/upload/Upload.class.php | 16 +++++++-- 3 files changed, 38 insertions(+), 20 deletions(-) diff --git a/html/webapp/modules/reservation/validator/Validator_Import.class.php b/html/webapp/modules/reservation/validator/Validator_Import.class.php index f89fab6..79c9f12 100644 --- a/html/webapp/modules/reservation/validator/Validator_Import.class.php +++ b/html/webapp/modules/reservation/validator/Validator_Import.class.php @@ -50,6 +50,7 @@ function validate($attributes, $errStr, $params) //利用できるグループのチェック $attributes["reserve_room_id"] = intval($attributes["reserve_room_id"]); if ($attributes["reserve_room_id"] != 0 && !in_array($attributes["reserve_room_id"], $attributes["allow_add_rooms"])) { + fclose($handle); return _INVALID_INPUT; } @@ -57,12 +58,14 @@ function validate($attributes, $errStr, $params) $row_csv_header = $csvMain->fgets($handle); if (empty($row_csv_header)) { $uploadsAction->delUploadsById($filelist[0]["upload_id"]); + fclose($handle); return RESERVATION_ERR_FILE_FORMAT; } $header_format = explode("|", RESERVATION_IMPORT_FORMAT); foreach ($header_format as $i=>$val) { if (mb_convert_encoding($row_csv_header[$i], "UTF-8", _CLIENT_OS_CHARSET) != $val) { $uploadsAction->delUploadsById($filelist[0]["upload_id"]); + fclose($handle); return RESERVATION_ERR_FILE_FORMAT; } } @@ -180,6 +183,7 @@ function validate($attributes, $errStr, $params) } if ($attributes["location"]["duplication_flag"] == _ON) { + fclose($handle); return true; } @@ -258,9 +262,11 @@ function validate($attributes, $errStr, $params) continue; } else { $dbObject->addError(); + fclose($handle); return false; } } + fclose($handle); //エラーがあれば出力する if (!empty($error)) { diff --git a/html/webapp/modules/room/view/admin/import/upload/Upload.class.php b/html/webapp/modules/room/view/admin/import/upload/Upload.class.php index 9187a7e..4a776aa 100755 --- a/html/webapp/modules/room/view/admin/import/upload/Upload.class.php +++ b/html/webapp/modules/room/view/admin/import/upload/Upload.class.php @@ -112,24 +112,23 @@ function execute() // その後のファイルの内容を展開し // 1行ずつチェックしていく // 成功した行はセッション変数に覚えさせる - // エラーがあったら速攻リターン $chg_num = 0; $delete_num = 0; $line = -1; + $errorMessage = ''; while( ($row=$this->csvMain->fgets($handle)) != false ) { if($line>=ROOM_IMPORT_LINE_LIMIT) { - $errorList->add(get_class($this), sprintf(ROOM_IMPORT_UPLOAD_LINE_OVER_ERR."(%s)", ROOM_IMPORT_LINE_LIMIT, $filename)); - $this->cleanup($file); - return 'error'; + $errorMessage = sprintf(ROOM_IMPORT_UPLOAD_LINE_OVER_ERR."(%s)", ROOM_IMPORT_LINE_LIMIT, $filename); + break; } - // SJISで来るので文字コード変換 + // 文字コード変換 $row = $this->convertCsv($row); // CSVのカラム数チェック おかしな行が1行でもあれば処理を中断 if(count($row) != ROOM_IMPORT_ITEM_COLUMN) { - $errorList->add(get_class($this), sprintf(ROOM_IMPORT_UPLOAD_COLUMN_ERR."(%s)", $line+1, $filename)); - $this->cleanup($file); - return 'error'; + // FIXME おかしな行が1行でもあれば、1回目のループで条件に入ってくるため、どこがおかしいかがメッセージからわからない + $errorMessage = sprintf(ROOM_IMPORT_UPLOAD_COLUMN_ERR."(%s)", $line+1, $filename); + break; } $line++; @@ -139,9 +138,8 @@ function execute() else { // その人は会員情報に存在するのか? if(!isset($room_users[$row[0]])) { - $errorList->add(get_class($this), sprintf(ROOM_IMPORT_UPLOAD_NOUSER_ERR, $line+1, $row[0])); - $this->cleanup($file); - return 'error'; + $errorMessage = sprintf(ROOM_IMPORT_UPLOAD_NOUSER_ERR, $line+1, $row[0]); + break; } else { $target_user = $room_users[$row[0]]; @@ -186,15 +184,13 @@ function execute() else { // それは存在する権限IDか if(!isset($target_user['permitted_auth'][$row[1]])) { - $errorList->add(get_class($this), sprintf(ROOM_IMPORT_UPLOAD_NOAUTH_ERR, $line+1, $row[1])); - $this->cleanup($file); - return 'error'; + $errorMessage = sprintf(ROOM_IMPORT_UPLOAD_NOAUTH_ERR, $line+1, $row[1]); + break; } // このユーザーに許可された権限か if(!($target_user['permitted_auth'][$row[1]])) { - $errorList->add(get_class($this), sprintf(ROOM_IMPORT_UPLOAD_NOT_PERMIT_AUTH, $line+1, $row[0], $row[1])); - $this->cleanup($file); - return 'error'; + $errorMessage = sprintf(ROOM_IMPORT_UPLOAD_NOT_PERMIT_AUTH, $line+1, $row[0], $row[1]); + break; } // それは現在設定されている権限IDと一緒?それとも異なる? if($now_auth != $row[1]) { @@ -212,6 +208,12 @@ function execute() fclose($handle); $this->_delImportFile($file); + if ($errorMessage !== '') { + $errorList->add(get_class($this), $errorMessage); + $this->cleanup($file); + return 'error'; + } + // ファイルの中身が空エラー if($line<1) { $errorList->add(get_class($this), sprintf(ROOM_IMPORT_UPLOAD_NODATAS_ERR."(%s)", $filename)); diff --git a/html/webapp/modules/user/view/admin/import/upload/Upload.class.php b/html/webapp/modules/user/view/admin/import/upload/Upload.class.php index e042580..bc8c0cb 100644 --- a/html/webapp/modules/user/view/admin/import/upload/Upload.class.php +++ b/html/webapp/modules/user/view/admin/import/upload/Upload.class.php @@ -79,7 +79,7 @@ function execute() } if (!isset($showitems) || !is_array($showitems)) { $errorList->add(get_class($this), sprintf("show items error")); - $this->_delImportFile($file); + $this->_delImportFile($file, $handle); return 'error'; } @@ -89,7 +89,7 @@ function execute() $row_data_headers = mb_convert_encoding($row_data_headers, "UTF-8", _CLIENT_OS_CHARSET); if (empty($row_data_headers)) { $errorList->add(get_class($this), sprintf(USER_IMPORT_UPLOAD_NODATA."(%s)", $filelist[0]['file_name'])); - $this->_delImportFile($file); + $this->_delImportFile($file, $handle); return 'error'; } $row_data_headers = explode(",", $row_data_headers); @@ -703,8 +703,18 @@ function dataCheck_infile_mail() return $errlist; } - function _delImportFile($file_path) { + /** + * インポートファイルの削除 + * @param string $file_path + * @param resource $handle ファイルハンドラ + * @return void + * @access private + */ + function _delImportFile($file_path, $handle = null) { if(file_exists($file_path)) { + if (!is_null($handle)) { + fclose($handle); + } @chmod($file_path, 0777); unlink($file_path); } From b36db19f3164d88a49b184891e722b778fac0b0e Mon Sep 17 00:00:00 2001 From: ohga Date: Wed, 4 Mar 2015 19:04:14 +0900 Subject: [PATCH 41/65] =?UTF-8?q?2015/9/22=20=E3=81=AE=E5=9B=BD=E6=B0=91?= =?UTF-8?q?=E3=81=AE=E4=BC=91=E6=97=A5=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/webapp/modules/holiday/sql/holiday.sql | 2 ++ 1 file changed, 2 insertions(+) mode change 100644 => 100755 html/webapp/modules/holiday/sql/holiday.sql diff --git a/html/webapp/modules/holiday/sql/holiday.sql b/html/webapp/modules/holiday/sql/holiday.sql old mode 100644 new mode 100755 index 403a5c9..249b043 --- a/html/webapp/modules/holiday/sql/holiday.sql +++ b/html/webapp/modules/holiday/sql/holiday.sql @@ -992,6 +992,7 @@ INSERT INTO `holiday` (`holiday_id`, `rrule_id`, `lang_dirname`, `holiday`, `sum INSERT INTO `holiday` (`holiday_id`, `rrule_id`, `lang_dirname`, `holiday`, `summary`, `holiday_type`) VALUES (988, 172, 'japanese', '20310720150000', '海の日', 0); INSERT INTO `holiday` (`holiday_id`, `rrule_id`, `lang_dirname`, `holiday`, `summary`, `holiday_type`) VALUES (989, 172, 'japanese', '20320718150000', '海の日', 0); INSERT INTO `holiday` (`holiday_id`, `rrule_id`, `lang_dirname`, `holiday`, `summary`, `holiday_type`) VALUES (990, 172, 'japanese', '20330717150000', '海の日', 0); +INSERT INTO `holiday` (`holiday_id`, `rrule_id`, `lang_dirname`, `holiday`, `summary`, `holiday_type`) VALUES (991, 173, 'japanese', '20150921150000', '国民の休日', 0); -- -- テーブルのダンプデータ `holiday_rrule` @@ -1169,6 +1170,7 @@ INSERT INTO `holiday_rrule` (`rrule_id`, `varidable_flag`, `substitute_flag`, `s INSERT INTO `holiday_rrule` (`rrule_id`, `varidable_flag`, `substitute_flag`, `start_time`, `end_time`, `rrule`, `insert_time`, `insert_site_id`, `insert_user_id`, `insert_user_name`, `update_time`, `update_site_id`, `update_user_id`, `update_user_name`) VALUES (170, 0, 0, '20060503150000', '20060503150000', '', '', 0, 0, '', '', 0, 0, ''); INSERT INTO `holiday_rrule` (`rrule_id`, `varidable_flag`, `substitute_flag`, `start_time`, `end_time`, `rrule`, `insert_time`, `insert_site_id`, `insert_user_id`, `insert_user_name`, `update_time`, `update_site_id`, `update_user_id`, `update_user_name`) VALUES (171, 0, 1, '19960719150000', '20020719150000', 'FREQ=YEARLY;INTERVAL=1;BYMONTH=7;UNTIL=20020719T150000', '', 0, 0, '', '', 0, 0, ''); INSERT INTO `holiday_rrule` (`rrule_id`, `varidable_flag`, `substitute_flag`, `start_time`, `end_time`, `rrule`, `insert_time`, `insert_site_id`, `insert_user_id`, `insert_user_name`, `update_time`, `update_site_id`, `update_user_id`, `update_user_name`) VALUES (172, 1, 0, '20030720150000', '20330717150000', 'FREQ=YEARLY;INTERVAL=1;BYMONTH=7;BYDAY=3MO;UNTIL=20330717T150000', '', 0, 0, '', '', 0, 0, ''); +INSERT INTO `holiday_rrule` (`rrule_id`, `varidable_flag`, `substitute_flag`, `start_time`, `end_time`, `rrule`, `insert_time`, `insert_site_id`, `insert_user_id`, `insert_user_name`, `update_time`, `update_site_id`, `update_user_id`, `update_user_name`) VALUES (173, 0, 0, '20150921150000', '20150921150000', '', '', 0, 0, '', '', 0, 0, ''); -- -- テーブルのダンプデータ `holiday_seq_id` From 9b9482b8874f4ed14628926999c41eab99220678 Mon Sep 17 00:00:00 2001 From: ohga Date: Thu, 5 Mar 2015 14:59:28 +0900 Subject: [PATCH 42/65] =?UTF-8?q?[php5.4=E4=BB=A5=E4=B8=8A=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C]=E6=96=87=E5=AD=97=E3=82=92=E5=85=A5=E5=8A=9B?= =?UTF-8?q?=E3=81=9B=E3=81=9A=E3=81=AB=E6=9B=B8=E3=81=8D=E8=BE=BC=E3=81=BF?= =?UTF-8?q?=E3=82=92=E3=81=99=E3=82=8B=E3=81=A8warning=E3=81=8C=E5=87=BA?= =?UTF-8?q?=E3=82=8B=E5=95=8F=E9=A1=8C=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/webapp/modules/chat/files/js/default/chat.js | 3 +++ 1 file changed, 3 insertions(+) mode change 100644 => 100755 html/webapp/modules/chat/files/js/default/chat.js diff --git a/html/webapp/modules/chat/files/js/default/chat.js b/html/webapp/modules/chat/files/js/default/chat.js old mode 100644 new mode 100755 index 1bec06a..ff8dfae --- a/html/webapp/modules/chat/files/js/default/chat.js +++ b/html/webapp/modules/chat/files/js/default/chat.js @@ -50,6 +50,9 @@ clsChat.prototype = { var top_el = $("chat_form" + this.id); var val_el = Element.getChildElementByClassName(top_el, "chat_text"); var chat_text = val_el ? val_el.value : null; + if (chat_text === '' || chat_text === null) { + return; + } var params = new Object(); params["method"] = "post"; params["top_el"] = top_el; From cee54098ddc16ec76b1a8a31113a43612ed7137c Mon Sep 17 00:00:00 2001 From: ohga Date: Fri, 13 Mar 2015 11:37:59 +0900 Subject: [PATCH 43/65] =?UTF-8?q?=E8=84=86=E5=BC=B1=E6=80=A7=E3=81=AE?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../circular/action/main/add/maple.ini | 2 +- .../circular/components/Action.class.php | 61 +++++++++---------- .../validator/Validator_ReceiveUser.class.php | 57 +++++++++++++++++ .../circular/view/main/users/Users.class.php | 2 +- .../circular/view/main/users/maple.ini | 3 + .../modules/journal/components/View.class.php | 6 +- .../modules/language/update/Update.class.php | 2 +- .../modules/module/update/Update.class.php | 11 +++- .../multidatabase/components/View.class.php | 2 +- .../modules/pm/components/Action.class.php | 7 ++- .../modules/pm/components/View.class.php | 6 +- .../Validator_FilterActionRequired.class.php | 37 +++++------ .../validator/Validator_AnswerFlag.class.php | 18 ++++-- .../reservation/components/View.class.php | 2 +- .../main/searchresult/Searchresult.class.php | 8 +++ .../view/admin/import/export/Export.class.php | 8 +++ 16 files changed, 163 insertions(+), 69 deletions(-) mode change 100644 => 100755 html/webapp/modules/circular/action/main/add/maple.ini mode change 100644 => 100755 html/webapp/modules/circular/components/Action.class.php create mode 100755 html/webapp/modules/circular/validator/Validator_ReceiveUser.class.php mode change 100644 => 100755 html/webapp/modules/circular/view/main/users/Users.class.php mode change 100644 => 100755 html/webapp/modules/circular/view/main/users/maple.ini mode change 100644 => 100755 html/webapp/modules/journal/components/View.class.php mode change 100644 => 100755 html/webapp/modules/language/update/Update.class.php mode change 100644 => 100755 html/webapp/modules/multidatabase/components/View.class.php mode change 100644 => 100755 html/webapp/modules/pm/components/Action.class.php mode change 100644 => 100755 html/webapp/modules/pm/components/View.class.php mode change 100644 => 100755 html/webapp/modules/pm/validator/Validator_FilterActionRequired.class.php mode change 100644 => 100755 html/webapp/modules/quiz/validator/Validator_AnswerFlag.class.php mode change 100644 => 100755 html/webapp/modules/reservation/components/View.class.php mode change 100644 => 100755 html/webapp/modules/user/action/main/searchresult/Searchresult.class.php mode change 100644 => 100755 html/webapp/modules/user/view/admin/import/export/Export.class.php diff --git a/html/webapp/modules/circular/action/main/add/maple.ini b/html/webapp/modules/circular/action/main/add/maple.ini old mode 100644 new mode 100755 index 6db5e47..035fe32 --- a/html/webapp/modules/circular/action/main/add/maple.ini +++ b/html/webapp/modules/circular/action/main/add/maple.ini @@ -11,7 +11,7 @@ circular_subject.required:g="1:lang._required,lang.circular_subject" circular_subject.maxlength = "1,_VALIDATOR_TITLE_LEN:lang._maxlength_error,lang.circular_subject,_VALIDATOR_TITLE_LEN" circular_body.required:g="1:lang._required,lang.circular_body" circular_body.maxlength = "1,_VALIDATOR_TEXTAREA_LEN:lang._maxlength_error,lang.circular_body,_VALIDATOR_TEXTAREA_LEN" -receive_user_ids.required:g="1:lang.circular_required_select" +receive_user_ids.circular.receiveUser = "1:lang.circular_required_select" key:choice_value,reply_type,choice_id.circular.circularChoice:choice = "1:lang.circular_choice_not_exist" period.date:period = "1:lang._invalid_date,lang.circular_period" key:period_checkbox,period.circular.period = "1:lang.circular_period_invalid" diff --git a/html/webapp/modules/circular/components/Action.class.php b/html/webapp/modules/circular/components/Action.class.php old mode 100644 new mode 100755 index ccac87b..fb31768 --- a/html/webapp/modules/circular/components/Action.class.php +++ b/html/webapp/modules/circular/components/Action.class.php @@ -149,7 +149,6 @@ function registCircular() $circularId = intval($circularId); $receiveUserIds = $this->_request->getParameter('receive_user_ids'); - $receiveUserIds = explode(",", $receiveUserIds); foreach ($receiveUserIds as $userID) { $insertParams = array( 'room_id' => $roomId, @@ -476,39 +475,39 @@ function updateUserSeen($type) return true; } - /** - * 新着情報にセットする - * + /** + * 新着情報にセットする + * * @param string $circularId 回覧ID * @return boolean (true:正常/false:異常) - * @access public - */ - function setWhatsnew($circularId) - { - $posts = $this->_db->selectExecute("circular", array("circular_id"=>$circularId)); - if (empty($posts)) { - return false; - } - + * @access public + */ + function setWhatsnew($circularId) + { + $posts = $this->_db->selectExecute("circular", array("circular_id"=>$circularId)); + if (empty($posts)) { + return false; + } + $pageId = $this->_request->getParameter("page_id"); - $whatsnewAction =& $this->_container->getComponent("whatsnewAction"); - - $whatsnew = array( - "unique_id" => $circularId, - "title" => $posts[0]["circular_subject"], - "description" => $posts[0]["circular_body"], - "action_name" => "circular_view_main_detail", - "parameters" => "circular_id=". $circularId . "&page_id=" . $pageId, - "insert_time" => $posts[0]["update_time"], - "update_time" => $posts[0]["update_time"] - ); - $result = $whatsnewAction->auto($whatsnew); - if ($result === false) { - return false; - } - - return true; - } + $whatsnewAction =& $this->_container->getComponent("whatsnewAction"); + + $whatsnew = array( + "unique_id" => $circularId, + "title" => $posts[0]["circular_subject"], + "description" => $posts[0]["circular_body"], + "action_name" => "circular_view_main_detail", + "parameters" => "circular_id=". $circularId . "&page_id=" . $pageId, + "insert_time" => $posts[0]["update_time"], + "update_time" => $posts[0]["update_time"] + ); + $result = $whatsnewAction->auto($whatsnew); + if ($result === false) { + return false; + } + + return true; + } /** * 期限を更新する diff --git a/html/webapp/modules/circular/validator/Validator_ReceiveUser.class.php b/html/webapp/modules/circular/validator/Validator_ReceiveUser.class.php new file mode 100755 index 0000000..ddab603 --- /dev/null +++ b/html/webapp/modules/circular/validator/Validator_ReceiveUser.class.php @@ -0,0 +1,57 @@ +getComponent('ActionChain'); + $actionName = $actionChain->getCurActionName(); + + if (empty($attributes)) { + if ($actionName === 'circular_view_main_users') { + return; + } + return $errStr; + } + $db =& $container->getComponent('DbObject'); + + $params = explode(',', $attributes); + $inClauseValue = str_repeat(",?", count($params)); + $sql = "SELECT user_id" . + " FROM {users}" . + " WHERE user_id IN (" . substr($inClauseValue, 1) . ")"; + $users = $db->execute($sql, $params); + if ($users === false) { + return _INVALID_INPUT; + } + $receiveUserIdArr = array(); + foreach ($users as $user) { + $receiveUserIdArr[] = $user['user_id']; + } + $request =& $container->getComponent('Request'); + $request->setParameter('receive_user_ids', $receiveUserIdArr); + + return; + } +} +?> diff --git a/html/webapp/modules/circular/view/main/users/Users.class.php b/html/webapp/modules/circular/view/main/users/Users.class.php old mode 100644 new mode 100755 index e5e0135..62d01cd --- a/html/webapp/modules/circular/view/main/users/Users.class.php +++ b/html/webapp/modules/circular/view/main/users/Users.class.php @@ -31,7 +31,7 @@ class Circular_View_Main_Users extends Action */ function execute() { - $users = explode(',', $this->receive_user_ids); + $users = (array)$this->receive_user_ids; if (intval($this->selected_room_id) == 0) { $result = $this->circularView->getGroupInfo($this->selected_group_id, $users); if ($result === false) { diff --git a/html/webapp/modules/circular/view/main/users/maple.ini b/html/webapp/modules/circular/view/main/users/maple.ini old mode 100644 new mode 100755 index 4f50e6b..f1e7f72 --- a/html/webapp/modules/circular/view/main/users/maple.ini +++ b/html/webapp/modules/circular/view/main/users/maple.ini @@ -1,6 +1,9 @@ [TokenExtra] mode="nobuild" +[ValidateDef] +receive_user_ids.circular.receiveUser = "1:lang._invalid_input" + [View] define:theme = 0 success = "circular_select_user_list.html" \ No newline at end of file diff --git a/html/webapp/modules/journal/components/View.class.php b/html/webapp/modules/journal/components/View.class.php old mode 100644 new mode 100755 index 2f3eb3c..67cfadd --- a/html/webapp/modules/journal/components/View.class.php +++ b/html/webapp/modules/journal/components/View.class.php @@ -448,7 +448,7 @@ function getPostList($journal_id, $category_id, $disp_cnt, $begin) { $params[] = ""; $request =& $this->_container->getComponent("Request"); - $module_id = $request->getParameter("module_id"); + $module_id = (int)$request->getParameter("module_id"); $sql = "SELECT P.*, C.category_name, URL.short_url ". "FROM {journal_post} P". @@ -484,7 +484,7 @@ function getPostDetail($post_id) { $params[] = $post_id; $request =& $this->_container->getComponent("Request"); - $module_id = $request->getParameter("module_id"); + $module_id = (int)$request->getParameter("module_id"); $sql = "SELECT P.*, C.category_name, URL.short_url ". "FROM {journal_post} P". @@ -564,7 +564,7 @@ function getPostDetailData($post_id) { $post_id ); - $module_id = $request->getParameter("module_id"); + $module_id = (int)$request->getParameter("module_id"); $sql = "SELECT P.*, C.category_name, URL.short_url ". "FROM {journal_post} P". diff --git a/html/webapp/modules/language/update/Update.class.php b/html/webapp/modules/language/update/Update.class.php old mode 100644 new mode 100755 index e05e363..a423a99 --- a/html/webapp/modules/language/update/Update.class.php +++ b/html/webapp/modules/language/update/Update.class.php @@ -42,7 +42,7 @@ function execute() } } - $sql = "SELECT {blocks}.*, {pages}.room_id FROM {blocks}, {pages} WHERE {blocks}.page_id={pages}.page_id AND {blocks}.module_id=".$this->module_id; + $sql = "SELECT {blocks}.*, {pages}.room_id FROM {blocks}, {pages} WHERE {blocks}.page_id={pages}.page_id AND {blocks}.module_id=".(int)$this->module_id; $blocks = $this->db->execute($sql); if($blocks === false) return false; if(!empty($blocks)) { diff --git a/html/webapp/modules/module/update/Update.class.php b/html/webapp/modules/module/update/Update.class.php index 21f297f..8840f90 100755 --- a/html/webapp/modules/module/update/Update.class.php +++ b/html/webapp/modules/module/update/Update.class.php @@ -166,9 +166,14 @@ function execute() //lang_dirname項目の更新 // $config_lang =& $this->configView->getConfigByConfname(_SYS_CONF_MODID, 'language'); - $defualt_lang = empty($config_lang['conf_value'])?'japanese':$config_lang['conf_value']; - $result = $this->db->execute("UPDATE {pages} SET {pages}.lang_dirname='".$defualt_lang. - "' WHERE {pages}.space_type="._SPACE_TYPE_PUBLIC." AND {pages}.display_position="._DISPLAY_POSITION_CENTER." AND {pages}.thread_num!=0"); + $default_lang = empty($config_lang['conf_value']) ? 'japanese' : $config_lang['conf_value']; + $params = array('lang_dirname' => $default_lang); + $where_params = array( + 'space_type' => _SPACE_TYPE_PUBLIC, + 'display_position' => _DISPLAY_POSITION_CENTER, + 'thread_num!' => 0, + ); + $result = $this->db->updateExecute('pages', $params, $where_params); if($result === false) return false; } diff --git a/html/webapp/modules/multidatabase/components/View.class.php b/html/webapp/modules/multidatabase/components/View.class.php old mode 100644 new mode 100755 index cdf7e1a..382644a --- a/html/webapp/modules/multidatabase/components/View.class.php +++ b/html/webapp/modules/multidatabase/components/View.class.php @@ -1360,7 +1360,7 @@ function &_getSqlContentWhereStatement($multidatabaseId, $whereValues, $keywordB */ function &_getAbbreviateUrlJoinStatement() { $request =& $this->_container->getComponent('Request'); - $moduleId = $request->getParameter('module_id'); + $moduleId = (int)$request->getParameter('module_id'); $joinStatement = 'LEFT JOIN {abbreviate_url} URL ' . "ON URL.module_id = '" . $moduleId . "' " diff --git a/html/webapp/modules/pm/components/Action.class.php b/html/webapp/modules/pm/components/Action.class.php old mode 100644 new mode 100755 index acb3289..eac672b --- a/html/webapp/modules/pm/components/Action.class.php +++ b/html/webapp/modules/pm/components/Action.class.php @@ -880,9 +880,14 @@ function setFilter() $filter_id, $user_id, ); + $actionIdArr = array(); + foreach ($actions as $actionId) { + $actionIdArr[] = (int)$actionId; + } + $sql = "DELETE FROM {pm_filter_action_link} ". "WHERE filter_id = ? AND insert_user_id = ? AND ". - "action_id NOT IN (" . join(",", $actions) . ")"; + "action_id NOT IN (" . join(",", $actionIdArr) . ")"; if (!$this->_db->execute($sql, $params)) { return false; diff --git a/html/webapp/modules/pm/components/View.class.php b/html/webapp/modules/pm/components/View.class.php old mode 100644 new mode 100755 index 0968380..d8ec749 --- a/html/webapp/modules/pm/components/View.class.php +++ b/html/webapp/modules/pm/components/View.class.php @@ -102,10 +102,10 @@ function &generateMessagesQuery($action = 'common', $count = false){ $sortColumn = $this->_request->getParameter("sort_col"); $sortDirection = $this->_request->getParameter("sort_dir"); - if (empty($sortColumn)) { + if (!in_array($sortColumn, array('r.insert_user_name', 'm.receivers_list', 'm.subject', 'm.sent_time'))) { $sortColumn = "m.sent_time"; } - if (empty($sortDirection)) { + if ((empty($sortDirection) || ($sortDirection != 'ASC' && $sortDirection != 'asc'))) { $sortDirection = "DESC"; } $orderParams[$sortColumn] = $sortDirection; @@ -819,7 +819,7 @@ function &_getFilterSql($filter) if (sizeof($tagFilter) == 2) { if ($tagFilter[0] == PM_FILTER_TAG) { $tag_id = $tagFilter[1]; - $filterSql = " AND receiver_id IN (SELECT receiver_id FROM {pm_message_tag_link} WHERE tag_id = " . $tag_id . ")"; + $filterSql = " AND receiver_id IN (SELECT receiver_id FROM {pm_message_tag_link} WHERE tag_id = " . (int)$tag_id . ")"; } } } diff --git a/html/webapp/modules/pm/validator/Validator_FilterActionRequired.class.php b/html/webapp/modules/pm/validator/Validator_FilterActionRequired.class.php old mode 100644 new mode 100755 index 208fa99..32f19a0 --- a/html/webapp/modules/pm/validator/Validator_FilterActionRequired.class.php +++ b/html/webapp/modules/pm/validator/Validator_FilterActionRequired.class.php @@ -14,25 +14,26 @@ */ class Pm_Validator_FilterActionRequired extends Validator { - /** - * フィルタ処理内容必須チェックバリデータ - * - * @param mixed $attributes チェックする値 - * @param string $errStr エラー文字列 - * @param array $params オプション引数 - * @return string エラー文字列(エラーの場合) - * @access public - */ - function validate($attributes, $errStr, $params) - { - - $filter_actions = $attributes["0"]; - - if ($filter_actions == null) { + /** + * フィルタ処理内容必須チェックバリデータ + * + * @param mixed $attributes チェックする値 + * @param string $errStr エラー文字列 + * @param array $params オプション引数 + * @return string エラー文字列(エラーの場合) + * @access public + */ + function validate($attributes, $errStr, $params) + { + if (empty($attributes)) { return $errStr; } - - return; - } + foreach ($attributes as $filterActionId) { + if (!is_numeric($filterActionId)) { + return _INVALID_INPUT; + } + } + return; + } } ?> \ No newline at end of file diff --git a/html/webapp/modules/quiz/validator/Validator_AnswerFlag.class.php b/html/webapp/modules/quiz/validator/Validator_AnswerFlag.class.php old mode 100644 new mode 100755 index 2abc072..2f67452 --- a/html/webapp/modules/quiz/validator/Validator_AnswerFlag.class.php +++ b/html/webapp/modules/quiz/validator/Validator_AnswerFlag.class.php @@ -25,13 +25,21 @@ class Quiz_Validator_AnswerFlag extends Validator */ function validate($attributes, $errStr, $params) { - foreach (array_keys($attributes["answer_flag"]) as $index) { - if ($attributes["answer_flag"][$index] != QUIZ_ANSWER_NOT_MARK_VALUE && - $attributes["answer_flag"][$index] != QUIZ_ANSWER_CORRECT_VALUE && - $attributes["answer_flag"][$index] != QUIZ_ANSWER_WRONG_VALUE) { + $answerFlagArr = array(); + foreach ($attributes["answer_flag"] as $answerId => $answerValue) { + if (!is_numeric($answerId) || + ($answerValue !== QUIZ_ANSWER_NOT_MARK_VALUE && + $answerValue !== QUIZ_ANSWER_CORRECT_VALUE && + $answerValue !== QUIZ_ANSWER_WRONG_VALUE) + ) { return $errStr; } - } + $answerFlagArr[(int)$answerId] = $answerValue; + } + + $container =& DIContainerFactory::getContainer(); + $request =& $container->getComponent('Request'); + $request->setParameter('answer_flag', $answerFlagArr); return; } diff --git a/html/webapp/modules/reservation/components/View.class.php b/html/webapp/modules/reservation/components/View.class.php old mode 100644 new mode 100755 index bbadea8..0ce0385 --- a/html/webapp/modules/reservation/components/View.class.php +++ b/html/webapp/modules/reservation/components/View.class.php @@ -498,7 +498,7 @@ function getLocations($category_id = null, $limit = null, $offset = null, $func= $sql .= "WHERE 1=1 "; } if (isset($category_id)) { - $sql .= "AND location.category_id = ".$category_id." "; + $sql .= "AND location.category_id = ".(int)$category_id." "; } $sql .= "ORDER BY category.display_sequence, location.display_sequence"; diff --git a/html/webapp/modules/user/action/main/searchresult/Searchresult.class.php b/html/webapp/modules/user/action/main/searchresult/Searchresult.class.php old mode 100644 new mode 100755 index 2a4a2fa..5caa915 --- a/html/webapp/modules/user/action/main/searchresult/Searchresult.class.php +++ b/html/webapp/modules/user/action/main/searchresult/Searchresult.class.php @@ -51,6 +51,14 @@ function execute() //初期化 $this->sort_col = ($this->sort_col == null) ? $this->sort_col ="user_authority_id" : $this->sort_col; $this->sort_dir = ($this->sort_dir == null) ? $this->sort_dir ="DESC" : $this->sort_dir; + if (!in_array($this->sort_col, array( + 'handle', 'login_id', 'user_name', 'user_authority_id', 'active_flag', 'insert_time', 'last_login_time') + )) { + $this->sort_col = "user_authority_id"; + } + if ((empty($this->sort_dir) || ($this->sort_dir != 'ASC' && $this->sort_dir != 'asc'))) { + $this->sort_dir = "DESC"; + } $this->user_id = $this->session->getParameter("_user_id"); //$module_link_where_params = array( // "role_authority_id" => $this->session->getParameter("_role_auth_id"), diff --git a/html/webapp/modules/user/view/admin/import/export/Export.class.php b/html/webapp/modules/user/view/admin/import/export/Export.class.php old mode 100644 new mode 100755 index cbc22a9..2cde912 --- a/html/webapp/modules/user/view/admin/import/export/Export.class.php +++ b/html/webapp/modules/user/view/admin/import/export/Export.class.php @@ -41,6 +41,14 @@ function execute() /* データ */ $this->sort_col = ($this->sort_col == null) ? $this->sort_col ="user_authority_id" : $this->sort_col; $this->sort_dir = ($this->sort_dir == null) ? $this->sort_dir ="DESC" : $this->sort_dir; + if (!in_array($this->sort_col, array( + 'handle', 'login_id', 'user_name', 'user_authority_id', 'active_flag', 'insert_time', 'last_login_time') + )) { + $this->sort_col = "user_authority_id"; + } + if ((empty($this->sort_dir) || ($this->sort_dir != 'ASC' && $this->sort_dir != 'asc'))) { + $this->sort_dir = "DESC"; + } $order_params = array( $this->sort_col => $this->sort_dir, "{users}.system_flag" => "DESC", From be9591f5fd10f30e3c452ac56aef5343ceb2ac87 Mon Sep 17 00:00:00 2001 From: Ryuji Masukawa Date: Fri, 13 Mar 2015 16:14:24 +0900 Subject: [PATCH 44/65] =?UTF-8?q?=E8=84=86=E5=BC=B1=E6=80=A7=E3=81=AE?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=EF=BC=88=E4=B8=80=E8=A6=A7=E7=94=BB=E9=9D=A2?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/maple/nccore/db/DbObjectAdodb.class.php | 19 ++++++++++++++++--- .../assignment/components/View.class.php | 2 +- .../modules/bbs/components/View.class.php | 2 +- .../modules/cabinet/components/View.class.php | 9 ++++++++- .../modules/journal/components/View.class.php | 2 +- .../linklist/components/View.class.php | 2 +- .../multidatabase/components/View.class.php | 2 +- .../photoalbum/components/View.class.php | 2 +- .../questionnaire/components/View.class.php | 2 +- .../modules/quiz/components/View.class.php | 2 +- .../registration/components/View.class.php | 2 +- .../modules/todo/components/View.class.php | 2 +- 12 files changed, 34 insertions(+), 14 deletions(-) diff --git a/html/maple/nccore/db/DbObjectAdodb.class.php b/html/maple/nccore/db/DbObjectAdodb.class.php index 570489a..81c7e25 100644 --- a/html/maple/nccore/db/DbObjectAdodb.class.php +++ b/html/maple/nccore/db/DbObjectAdodb.class.php @@ -299,6 +299,15 @@ function execute($sql, $params = array(), $limit = 0, $offset = 0, $key_flag = t else $this->_conn->SetFetchMode(ADODB_FETCH_NUM); + // paramsのvalueに配列の入力パラメータがはいった場合、adodb内で複数のSQLを実行しようとするため、ここで対処。 + if (is_array($params)) { + foreach($params as $param) { + if (is_array($param)) { + return false; + } + } + } + if ($limit || $offset) { $result =& $this->_conn->SelectLimit($sql, $limit, $offset, $params); } else { @@ -556,7 +565,7 @@ function &getSelectSQL($tableName, &$params, &$where_params, &$order_params) * パラメータよりwhere文を生成し返す * @param array $params WHERE句のデータ配列 * @param array $where_params キー名称配列、whereデータ配列 - * @param array $where_prefix_flag 接頭語句をANDでなくwhereにして返す場合、true defaut:true + * @param array $where_prefix_flag 接頭語句をANDでなくwhereにして返す場合、true default:true * @return string where文 * @access public */ @@ -583,15 +592,19 @@ function &getWhereSQL(&$params, &$where_params, $where_prefix_flag = true) /** * パラメータよりorder文を生成し返す * @param array $order_params キー名称配列、orderデータ配列 + * @param array $allow_keys キー名称で設定できるカラムの配列 * @return string order文 * @access public */ - function &getOrderSQL(&$order_params) + function &getOrderSQL(&$order_params, $allow_keys = array()) { $sql_order = ""; if (!empty($order_params)) { foreach ($order_params as $key=>$item) { - $sql_order .= ",".$key." ".(empty($item) ? "ASC" : $item); + if (!empty($allow_keys) && !in_array($key, $allow_keys)) { + $key = $allow_keys[0]; + } + $sql_order .= ",".$key." ".((empty($item) || ($item != 'DESC' && $item != 'desc')) ? "ASC" : $item); } } $sql_order = ($sql_order ? " ORDER BY ".substr($sql_order,1) : ""); diff --git a/html/webapp/modules/assignment/components/View.class.php b/html/webapp/modules/assignment/components/View.class.php index 0f83b04..d3609c1 100644 --- a/html/webapp/modules/assignment/components/View.class.php +++ b/html/webapp/modules/assignment/components/View.class.php @@ -172,7 +172,7 @@ function &getAssignments() " ON (Assign.assignment_id = Submitter.assignment_id)". " WHERE Assign.room_id = ?" . " GROUP BY Assign.assignment_id". - " ".$this->_db->getOrderSQL($order); + " ".$this->_db->getOrderSQL($order, array('Assign.assignment_id', 'assignment_name', 'activity', 'insert_user_name', 'insert_time')); $assignments = $this->_db->execute($sql, $params, $limit, $offset, true); if ($assignments === false) { diff --git a/html/webapp/modules/bbs/components/View.class.php b/html/webapp/modules/bbs/components/View.class.php index f50520d..32c1541 100644 --- a/html/webapp/modules/bbs/components/View.class.php +++ b/html/webapp/modules/bbs/components/View.class.php @@ -160,7 +160,7 @@ function &getBbses() $sql = "SELECT bbs_id, bbs_name, activity, insert_time, insert_user_id, insert_user_name ". "FROM {bbs} ". "WHERE room_id = ? ". - $this->_db->getOrderSQL($orderParams); + $this->_db->getOrderSQL($orderParams, array('bbs_name', 'activity', 'insert_user_name', 'insert_time')); $bbses = $this->_db->execute($sql, $params, $limit, $offset); if ($bbses === false) { $this->_db->addError(); diff --git a/html/webapp/modules/cabinet/components/View.class.php b/html/webapp/modules/cabinet/components/View.class.php index 0c235fd..98faa62 100644 --- a/html/webapp/modules/cabinet/components/View.class.php +++ b/html/webapp/modules/cabinet/components/View.class.php @@ -201,7 +201,7 @@ function &getCabinets() $sort_col = "insert_time"; } $sort_dir = $this->_request->getParameter("sort_dir"); - if (empty($sort_dir)) { + if ((empty($sort_dir) || ($sort_dir != 'ASC' && $sort_dir != 'asc'))) { $sort_dir = "DESC"; } @@ -215,6 +215,9 @@ function &getCabinets() if ($sort_col == "total_size") { $sql .= " ORDER BY ".$sort_col." ".$sort_dir; } else { + if(!in_array($sort_col, array('cabinet_name', 'total_size', 'insert_user_name', 'insert_time'))) { + $sort_col = "insert_time"; + } $sql .= " ORDER BY manage.".$sort_col." ".$sort_dir; } $sql .= ", manage.cabinet_id DESC"; @@ -672,6 +675,10 @@ function getFileList($offset, $limit) $sort_dir = $this->_request->getParameter("sort_dir"); if (isset($sort_col)) { + if(!in_array($sort_col, array('file_name', 'size', 'insert_user_name', 'insert_time', 'update_user_name', 'update_time', 'comment'))) { + $sort_col = 'file_name'; + } + $sort_dir = (empty($sort_dir) || ($sort_dir != 'DESC' && $sort_dir != 'desc')) ? 'ASC' : 'DESC'; if ($sort_col == "comment") { $order_params = array( "F.file_type" => ($sort_dir == "ASC" ? "DESC" : "ASC"), diff --git a/html/webapp/modules/journal/components/View.class.php b/html/webapp/modules/journal/components/View.class.php index af3afe3..2f3eb3c 100644 --- a/html/webapp/modules/journal/components/View.class.php +++ b/html/webapp/modules/journal/components/View.class.php @@ -98,7 +98,7 @@ function &getJournals() { $sql = "SELECT journal_id, journal_name, active_flag, insert_time, insert_user_id, insert_user_name ". "FROM {journal} ". "WHERE room_id = ? ". - $this->_db->getOrderSQL($orderParams); + $this->_db->getOrderSQL($orderParams, array('journal_name', 'active_flag', 'insert_user_name', 'insert_time')); $result = $this->_db->execute($sql, $params, $limit, $offset); if ($result === false) { $this->_db->addError(); diff --git a/html/webapp/modules/linklist/components/View.class.php b/html/webapp/modules/linklist/components/View.class.php index 14e4807..ec46065 100644 --- a/html/webapp/modules/linklist/components/View.class.php +++ b/html/webapp/modules/linklist/components/View.class.php @@ -151,7 +151,7 @@ function &getLinklists() $sql = "SELECT linklist_id, linklist_name, insert_time, insert_user_id, insert_user_name ". "FROM {linklist} ". "WHERE room_id = ? ". - $this->_db->getOrderSQL($orderParams); + $this->_db->getOrderSQL($orderParams, array('linklist_id', 'linklist_name', 'insert_user_name', 'insert_time')); $linklists = $this->_db->execute($sql, $params, $limit, $offset); if ($linklists === false) { $this->_db->addError(); diff --git a/html/webapp/modules/multidatabase/components/View.class.php b/html/webapp/modules/multidatabase/components/View.class.php index 197ac45..cdf7e1a 100644 --- a/html/webapp/modules/multidatabase/components/View.class.php +++ b/html/webapp/modules/multidatabase/components/View.class.php @@ -351,7 +351,7 @@ function &getMdbs() { $sql = "SELECT multidatabase_id, multidatabase_name, active_flag, insert_time, insert_user_id, insert_user_name ". "FROM {multidatabase} ". "WHERE room_id = ? ". - $this->_db->getOrderSQL($orderParams); + $this->_db->getOrderSQL($orderParams, array('multidatabase_id', 'multidatabase_name', 'insert_user_name', 'insert_time')); $result = $this->_db->execute($sql, $params, $limit, $offset); if ($result === false) { $this->_db->addError(); diff --git a/html/webapp/modules/photoalbum/components/View.class.php b/html/webapp/modules/photoalbum/components/View.class.php index 065b012..8dfd431 100644 --- a/html/webapp/modules/photoalbum/components/View.class.php +++ b/html/webapp/modules/photoalbum/components/View.class.php @@ -174,7 +174,7 @@ function &getPhotoalbums() $sql = "SELECT photoalbum_id, photoalbum_name, insert_time, insert_user_id, insert_user_name ". "FROM {photoalbum} ". "WHERE room_id = ? ". - $this->_db->getOrderSQL($orderParams); + $this->_db->getOrderSQL($orderParams, array('photoalbum_id', 'photoalbum_name', 'insert_user_name', 'insert_time')); $photoalbums = $this->_db->execute($sql, $params, $limit, $offset); if ($photoalbums === false) { $this->_db->addError(); diff --git a/html/webapp/modules/questionnaire/components/View.class.php b/html/webapp/modules/questionnaire/components/View.class.php index 211d2f2..8e95773 100644 --- a/html/webapp/modules/questionnaire/components/View.class.php +++ b/html/webapp/modules/questionnaire/components/View.class.php @@ -176,7 +176,7 @@ function &getQuestionnaires() "WHERE Q.room_id = ? ". "GROUP BY Q.questionnaire_id, Q.questionnaire_name, Q.icon_name, Q.status, ". "Q.insert_time, Q.insert_user_id, Q.insert_user_name ". - $this->_db->getOrderSQL($orderParams); + $this->_db->getOrderSQL($orderParams, array('questionnaire_id', 'questionnaire_name', 'status', 'insert_user_name', 'insert_time')); $questionnaires = $this->_db->execute($sql, $params, $limit, $offset); if ($questionnaires === false) { $this->_db->addError(); diff --git a/html/webapp/modules/quiz/components/View.class.php b/html/webapp/modules/quiz/components/View.class.php index 14acf52..d82af26 100644 --- a/html/webapp/modules/quiz/components/View.class.php +++ b/html/webapp/modules/quiz/components/View.class.php @@ -175,7 +175,7 @@ function &getQuizzes() "WHERE Q.room_id = ? ". "GROUP BY Q.quiz_id, Q.quiz_name, Q.icon_name, Q.status, ". "Q.insert_time, Q.insert_user_id, Q.insert_user_name ". - $this->_db->getOrderSQL($orderParams); + $this->_db->getOrderSQL($orderParams, array('quiz_id', 'quiz_name', 'status', 'insert_user_name', 'insert_time')); $quizzes = $this->_db->execute($sql, $params, $limit, $offset); if ($quizzes === false) { $this->_db->addError(); diff --git a/html/webapp/modules/registration/components/View.class.php b/html/webapp/modules/registration/components/View.class.php index efffefc..581c002 100644 --- a/html/webapp/modules/registration/components/View.class.php +++ b/html/webapp/modules/registration/components/View.class.php @@ -159,7 +159,7 @@ function &getRegistrations() "ON R.registration_id = D.registration_id ". "WHERE R.room_id = ? ". "GROUP BY R.registration_id, R.registration_name, R.active_flag, R.insert_time, R.insert_user_id, R.insert_user_name ". - $this->_db->getOrderSQL($orderParams); + $this->_db->getOrderSQL($orderParams, array('R.registration_id', 'R.registration_name', 'data_count', 'R.active_flag', 'R.insert_user_name', 'R.insert_time')); $registrations = $this->_db->execute($sql, $params, $limit, $offset); if ($registrations === false) { $this->_db->addError(); diff --git a/html/webapp/modules/todo/components/View.class.php b/html/webapp/modules/todo/components/View.class.php index 97c12af..53519c7 100644 --- a/html/webapp/modules/todo/components/View.class.php +++ b/html/webapp/modules/todo/components/View.class.php @@ -271,7 +271,7 @@ function &getTodos() $sql = "SELECT todo_id, todo_name, insert_time, insert_user_id, insert_user_name ". "FROM {todo} ". "WHERE room_id = ? ". - $this->_db->getOrderSQL($orderParams); + $this->_db->getOrderSQL($orderParams, array('todo_id', 'todo_name', 'insert_user_name', 'insert_time')); $todos = $this->_db->execute($sql, $params); if ($todos === false) { $this->_db->addError(); From 214020de7bb4d2cdfa18e5d697ee023c234fb1bc Mon Sep 17 00:00:00 2001 From: Ryuji Masukawa Date: Fri, 13 Mar 2015 18:29:34 +0900 Subject: [PATCH 45/65] =?UTF-8?q?=E8=84=86=E5=BC=B1=E6=80=A7=E3=81=AE?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/webapp/components/holiday/View.class.php | 6 ++++++ .../multidatabase/view/main/init/Init.class.php | 3 +++ .../view/main/search/result/Result.class.php | 3 +++ .../modules/questionnaire/components/View.class.php | 6 +++--- html/webapp/modules/quiz/components/View.class.php | 2 +- .../modules/registration/components/View.class.php | 10 ++++++++-- html/webapp/modules/todo/components/View.class.php | 5 ++++- 7 files changed, 28 insertions(+), 7 deletions(-) diff --git a/html/webapp/components/holiday/View.class.php b/html/webapp/components/holiday/View.class.php index 2b544c1..2f81c74 100644 --- a/html/webapp/components/holiday/View.class.php +++ b/html/webapp/components/holiday/View.class.php @@ -116,6 +116,12 @@ function getYear($year=null, $lang=null, $sort_col="holiday", $sort_dir="ASC") $session =& $this->_container->getComponent("Session"); $lang = $session->getParameter("_lang"); } + if (!in_array($sort_col, array('holiday', 'summary'))) { + $sort_col = 'holiday'; + } + if ($sort_dir != 'DESC') { + $sort_dir = 'ASC'; + } $sql = "SELECT * FROM {holiday} "; $sql .= "WHERE lang_dirname = ? "; $sql .= "AND holiday >= ? "; diff --git a/html/webapp/modules/multidatabase/view/main/init/Init.class.php b/html/webapp/modules/multidatabase/view/main/init/Init.class.php index 17338e3..0fd92c0 100644 --- a/html/webapp/modules/multidatabase/view/main/init/Init.class.php +++ b/html/webapp/modules/multidatabase/view/main/init/Init.class.php @@ -104,6 +104,9 @@ function execute() $where_params = array(); if(!empty($this->sort_section)) { foreach($this->sort_section as $key => $val) { + if (!isset($this->section_metadatas[$key])) { + return 'error'; + } $where_params["m_content".$key.".content"] = $val; } } diff --git a/html/webapp/modules/multidatabase/view/main/search/result/Result.class.php b/html/webapp/modules/multidatabase/view/main/search/result/Result.class.php index 4e72509..23bee1f 100644 --- a/html/webapp/modules/multidatabase/view/main/search/result/Result.class.php +++ b/html/webapp/modules/multidatabase/view/main/search/result/Result.class.php @@ -183,6 +183,9 @@ function execute() $where_params = array(); if(!empty($this->sort_section)) { foreach($this->sort_section as $key => $val) { + if (!isset($this->section_metadatas[$key])) { + return 'error'; + } $where_params["m_content".$key.".content"]= $val; } } diff --git a/html/webapp/modules/questionnaire/components/View.class.php b/html/webapp/modules/questionnaire/components/View.class.php index 8e95773..54eda84 100644 --- a/html/webapp/modules/questionnaire/components/View.class.php +++ b/html/webapp/modules/questionnaire/components/View.class.php @@ -831,12 +831,12 @@ function &getSummaries() $offset = $this->_request->getParameter("offset"); $sortColumn = $this->_request->getParameter("sort_col"); - if (empty($sortColumn)) { + if (empty($sortColumn) || !in_array($sortColumn, array('answer_number', 'answer_time'))) { $sortColumn = "summary_id"; } $sortDirection = $this->_request->getParameter("sort_dir"); - if (empty($sortDirection)) { - $sortDirection = ($mobile_flag==_ON ? "DESC" : "ASC"); + if (empty($sortDirection) || $sortDirection != 'DESC') { + $sortDirection = "ASC"; } $orderParams[$sortColumn] = $sortDirection; diff --git a/html/webapp/modules/quiz/components/View.class.php b/html/webapp/modules/quiz/components/View.class.php index d82af26..ae3bfcb 100644 --- a/html/webapp/modules/quiz/components/View.class.php +++ b/html/webapp/modules/quiz/components/View.class.php @@ -872,7 +872,7 @@ function &getSummaries($statistics = null) $offset = $this->_request->getParameter("offset"); $sortColumn = $this->_request->getParameter("sort_col"); - if (empty($sortColumn)) { + if (empty($sortColumn) || !in_array($sortColumn, array('answer_number', 'answer_time', 'summary_score'))) { $sortColumn = "summary_id"; } $sortDirection = $this->_request->getParameter("sort_dir"); diff --git a/html/webapp/modules/registration/components/View.class.php b/html/webapp/modules/registration/components/View.class.php index 581c002..5c39cea 100644 --- a/html/webapp/modules/registration/components/View.class.php +++ b/html/webapp/modules/registration/components/View.class.php @@ -632,8 +632,14 @@ function &getDataList($limit = null, $offset = null) $sortColumn = "file_name". $sortItemID; $sortDirection = "ASC"; } else { - $sortColumn = "item_data_value". $sortItemID; - $sortDirection = "ASC"; + $items = $this->_request->getParameter("items"); + if (isset($items[$sortItemID])) { + $sortColumn = "item_data_value". $sortItemID; + $sortDirection = "ASC"; + } else { + $sortColumn = "D.insert_time"; + $sortDirection = "DESC"; + } } $orderParams[$sortColumn] = $sortDirection; diff --git a/html/webapp/modules/todo/components/View.class.php b/html/webapp/modules/todo/components/View.class.php index 53519c7..83b7c3c 100644 --- a/html/webapp/modules/todo/components/View.class.php +++ b/html/webapp/modules/todo/components/View.class.php @@ -508,7 +508,10 @@ function &getTasks() $sortColumn = "task_value"; } } - if (empty($sortDirection)) { + if (!in_array($sortColumn, array('task_sequence', 'priority', 'state', 'period', 'progress', 'task_value'))) { + $sortColumn = "task_sequence"; + } + if (empty($sortDirection) || $sortDirection != 'DESC') { $sortDirection = "ASC"; } $orderParams[$sortColumn] = $sortDirection; From dbb97a814a29bfa1a9cd1f2ecff615001264068e Mon Sep 17 00:00:00 2001 From: Ryuji Masukawa Date: Fri, 13 Mar 2015 19:03:39 +0900 Subject: [PATCH 46/65] =?UTF-8?q?=E8=84=86=E5=BC=B1=E6=80=A7=E3=81=AE?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/webapp/modules/assignment/components/View.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/webapp/modules/assignment/components/View.class.php b/html/webapp/modules/assignment/components/View.class.php index d3609c1..d47fc46 100644 --- a/html/webapp/modules/assignment/components/View.class.php +++ b/html/webapp/modules/assignment/components/View.class.php @@ -749,7 +749,7 @@ function &getSubmitters($yet_submit=false) $sort_col = "submit_time"; } $sort_dir = $this->_request->getParameter("sort_dir"); - if (empty($sort_dir)) { + if (empty($sort_dir) || $sort_dir != 'ASC') { $sort_dir = "DESC"; } From 7d20246d5dfe5bf795d3935e93c5415457a7d88d Mon Sep 17 00:00:00 2001 From: Ryuji Masukawa Date: Tue, 17 Mar 2015 09:54:17 +0900 Subject: [PATCH 47/65] =?UTF-8?q?=E8=84=86=E5=BC=B1=E6=80=A7=E3=81=AE?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/webapp/modules/login/view/main/init/Init.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/webapp/modules/login/view/main/init/Init.class.php b/html/webapp/modules/login/view/main/init/Init.class.php index 66d37a8..c9766a9 100644 --- a/html/webapp/modules/login/view/main/init/Init.class.php +++ b/html/webapp/modules/login/view/main/init/Init.class.php @@ -52,7 +52,7 @@ function execute() $this->redirect_url = $this->request->getParameter('_redirect_url'); $this->redirect_url = str_replace("#", "@@", $this->redirect_url); $this->redirect_url = str_replace("&", "@", $this->redirect_url); - $this->redirect_url = str_replace("?action=", "?_sub_action=", $this->redirect_url); + $this->redirect_url = htmlspecialchars(str_replace("?action=", "?_sub_action=", $this->redirect_url), ENT_QUOTES); //if(!isset($_SERVER['HTTPS']) && $this->session->getParameter("_user_id")) { if($this->session->getParameter("_user_id") From 374ffb227d9bb37fc5920d842a78e8e8a0bf8cd3 Mon Sep 17 00:00:00 2001 From: ohga Date: Mon, 16 Mar 2015 20:05:58 +0900 Subject: [PATCH 48/65] =?UTF-8?q?=E8=84=86=E5=BC=B1=E6=80=A7=E3=81=AE?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/webapp/components/common/Main.class.php | 4 +-- .../login/view/main/init/Init.class.php | 2 +- .../templates/main/mobile_redirect.html | 12 ++++---- html/webapp/templates/main/redirect.html | 28 +++++++++++-------- 4 files changed, 24 insertions(+), 22 deletions(-) mode change 100644 => 100755 html/webapp/modules/login/view/main/init/Init.class.php mode change 100644 => 100755 html/webapp/templates/main/mobile_redirect.html mode change 100644 => 100755 html/webapp/templates/main/redirect.html diff --git a/html/webapp/components/common/Main.class.php b/html/webapp/components/common/Main.class.php index feec79f..460b2c0 100755 --- a/html/webapp/components/common/Main.class.php +++ b/html/webapp/components/common/Main.class.php @@ -465,13 +465,11 @@ function redirectHeader($url="", $time = 2, $message = "") if($url == "") { $url = BASE_URL.INDEX_FILE_NAME."?".ACTION_KEY."=".DEFAULT_ACTION; } - //$url = htmlspecialchars(str_replace("?action=","?_sub_action=",str_replace("&","@",BASE_URL.INDEX_FILE_NAME.$this->_request->getStrParameters(false))), ENT_QUOTES); $renderer =& SmartyTemplate::getInstance(); $renderer->assign('header_field',$meta); $renderer->assign('time', $time); - $renderer->assign('url',$url); - $renderer->assign('lang_ifnotreload', sprintf(_IFNOTRELOAD,$url)); + $renderer->assign('redirect_url', $url); if($message != "") { $renderer->assign('redirect_message', $message); } else { diff --git a/html/webapp/modules/login/view/main/init/Init.class.php b/html/webapp/modules/login/view/main/init/Init.class.php old mode 100644 new mode 100755 index c9766a9..66d37a8 --- a/html/webapp/modules/login/view/main/init/Init.class.php +++ b/html/webapp/modules/login/view/main/init/Init.class.php @@ -52,7 +52,7 @@ function execute() $this->redirect_url = $this->request->getParameter('_redirect_url'); $this->redirect_url = str_replace("#", "@@", $this->redirect_url); $this->redirect_url = str_replace("&", "@", $this->redirect_url); - $this->redirect_url = htmlspecialchars(str_replace("?action=", "?_sub_action=", $this->redirect_url), ENT_QUOTES); + $this->redirect_url = str_replace("?action=", "?_sub_action=", $this->redirect_url); //if(!isset($_SERVER['HTTPS']) && $this->session->getParameter("_user_id")) { if($this->session->getParameter("_user_id") diff --git a/html/webapp/templates/main/mobile_redirect.html b/html/webapp/templates/main/mobile_redirect.html old mode 100644 new mode 100755 index 8824282..69e6ce4 --- a/html/webapp/templates/main/mobile_redirect.html +++ b/html/webapp/templates/main/mobile_redirect.html @@ -23,14 +23,12 @@
-<{if (!empty($lang_ifnotreload|smarty:nodefaults)) }> - <{$lang_ifnotreload|smarty:nodefaults}> -<{elseif (!empty($action.redirect_url|smarty:nodefaults)) }> - <{$smarty.const._IFNOTRELOAD|sprintf:$action.redirect_url|smarty:nodefaults}> -<{else}> - <{assign var="redirect_url" value=$smarty.const.BASE_URL|cat:$smarty.const.INDEX_FILE_NAME|smarty:nodefaults}> - <{$smarty.const._IFNOTRELOAD|sprintf:$redirect_url|smarty:nodefaults}> +<{if isset($action.redirect_url|smarty:nodefaults)}> + <{assign var="redirect_url" value=$action.redirect_url|smarty:nodefaults}> +<{elseif empty($redirect_url|smarty:nodefaults)}> + <{assign var="redirect_url" value=$smarty.const.BASE_URL|cat:$smarty.const.INDEX_FILE_NAME}> <{/if}> +<{$smarty.const._IFNOTRELOAD|smarty:nodefaults|sprintf:$redirect_url}> diff --git a/html/webapp/templates/main/redirect.html b/html/webapp/templates/main/redirect.html old mode 100644 new mode 100755 index 0869964..79650e8 --- a/html/webapp/templates/main/redirect.html +++ b/html/webapp/templates/main/redirect.html @@ -2,8 +2,22 @@ +<{if isset($action.redirect_url|smarty:nodefaults)}> + <{assign var="redirect_url" value=$action.redirect_url|smarty:nodefaults}> +<{elseif empty($redirect_url|smarty:nodefaults)}> + <{assign var="redirect_url" value=$smarty.const.BASE_URL|cat:$smarty.const.INDEX_FILE_NAME}> +<{/if}> -<{else}><{$url|replace:"&":"&"}><{/if}>" /> + <{$header_field.sitename}> <{$smarty.const.INDEX_FILE_NAME}>?<{$smarty.const.ACTION_KEY}>=common_download_css" /> <{$header_field.script_header|smarty:nodefaults}> @@ -26,22 +40,14 @@   - <{if isset($lang_ifnotreload|smarty:nodefaults)}> - <{$lang_ifnotreload|smarty:nodefaults}> - <{elseif isset($action.redirect_url|smarty:nodefaults)}> - <{assign var="redirect_url" value=$action.redirect_url|smarty:nodefaults}> - <{$smarty.const._IFNOTRELOAD|smarty:nodefaults|sprintf:$redirect_url}> - <{else}> - <{assign var="redirect_url" value=$smarty.const.BASE_URL|cat:$smarty.const.INDEX_FILE_NAME}> - <{$smarty.const._IFNOTRELOAD|smarty:nodefaults|sprintf:$redirect_url}> - <{/if}> + <{$smarty.const._IFNOTRELOAD|smarty:nodefaults|sprintf:$redirect_url}> + From 909fdcadc30a3d4cf209546bbb5fce1bb8f920ff Mon Sep 17 00:00:00 2001 From: Ryuji Masukawa Date: Tue, 4 Oct 2016 13:59:28 +0900 Subject: [PATCH 63/65] =?UTF-8?q?=E6=BA=96=E5=82=99=E4=B8=AD=E3=81=AE?= =?UTF-8?q?=E3=82=82=E3=81=AE=E3=81=8C=E4=B8=80=E9=83=A8=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=E3=81=95=E3=82=8C=E3=82=8B=E4=B8=8D=E5=85=B7=E5=90=88=E3=81=AB?= =?UTF-8?q?=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/chgdisplay/Chgdisplay.class.php | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) mode change 100755 => 100644 html/webapp/modules/room/action/admin/chgdisplay/Chgdisplay.class.php diff --git a/html/webapp/modules/room/action/admin/chgdisplay/Chgdisplay.class.php b/html/webapp/modules/room/action/admin/chgdisplay/Chgdisplay.class.php old mode 100755 new mode 100644 index 173d264..4e7ec24 --- a/html/webapp/modules/room/action/admin/chgdisplay/Chgdisplay.class.php +++ b/html/webapp/modules/room/action/admin/chgdisplay/Chgdisplay.class.php @@ -53,10 +53,15 @@ function execute() // --- 準備中->公開中に変更した場合、そのサブグループも公開中にする // ---------------------------------------------------------------------- if($this->page['display_flag'] != $display_flag) { - $where_params = array( - "parent_id" => intval($this->edit_current_page_id) + $rooms_where_params = array( + "room_id = ".intval($this->edit_current_page_id)." OR parent_id = ".intval($this->edit_current_page_id) => null ); - $subgroup_pages_id_arr =& $this->pagesView->getPages($where_params, null, null, null, array($this, "_subpagesFetchcallback")); + $rooms_id_arr =& $this->pagesView->getPages($rooms_where_params, null, null, null, array($this, "_roomsFetchcallback")); + $pages_where_params = array( + " room_id IN (". implode(",", $rooms_id_arr). ") " => null + ); + $subgroup_pages_id_arr =& $this->pagesView->getPages($pages_where_params, null, null, null, array($this, "_subpagesFetchcallback")); + if(count($subgroup_pages_id_arr) > 0) { $params = array( "display_flag" => $display_flag @@ -71,7 +76,22 @@ function execute() } } } - + + // add by mutaguchi@opensource-workshop.jp + /** + * fetch時コールバックメソッド + * @param result adodb object + * @return array items + * @access private + */ + function &_roomsFetchcallback($result) { + $ret = array(); + while ($row = $result->fetchRow()) { + $ret[$row['room_id']] = $row['room_id']; + } + return $ret; + } + /** * fetch時コールバックメソッド * @param result adodb object From b4fb8b6f6fc7077bd2ccc9a4a10aacdf6fe4d6a5 Mon Sep 17 00:00:00 2001 From: kteraguchi Date: Tue, 25 Apr 2017 18:04:04 +0900 Subject: [PATCH 64/65] Fix script tag escape --- html/webapp/components/escape/Text.class.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/html/webapp/components/escape/Text.class.php b/html/webapp/components/escape/Text.class.php index c3e1ae6..7572899 100644 --- a/html/webapp/components/escape/Text.class.php +++ b/html/webapp/components/escape/Text.class.php @@ -445,6 +445,11 @@ function _escapeWysiwygAllowHtmltag($string) { $script_flag = false; foreach ($parts as $part) { // script-/scriptまではそのまま連結 + if(preg_match("/<\/script>$/u", $part)) { + $script_flag = false; + $string .= $part; + continue; + } if(preg_match("/^/u", $part) || $script_flag == true) { $script_flag = true; if (preg_match("/<\!\-\-comment\-\->/u", $part)) { @@ -453,10 +458,6 @@ function _escapeWysiwygAllowHtmltag($string) { } $string .= $part; continue; - } else if(preg_match("/<\/script>$/u", $part)) { - $script_flag = false; - $string .= $part; - continue; } if (preg_match("/<\!\-\-comment\-\->/u", $part)) { From c06abd188c5e04d4f52ae58b587d9915f23341bf Mon Sep 17 00:00:00 2001 From: Ryuji Masukawa Date: Wed, 17 Jan 2018 18:52:29 +0900 Subject: [PATCH 65/65] =?UTF-8?q?=E4=BB=A5=E4=B8=8B=E3=81=AE=E4=B8=8D?= =?UTF-8?q?=E5=85=B7=E5=90=88=E3=82=92=E4=BF=AE=E6=AD=A3=20=E2=91=A0?= =?UTF-8?q?=E6=96=B0=E8=A6=8F=E3=81=A7ToDo=E3=82=92=E4=BD=9C=E6=88=90=20?= =?UTF-8?q?=E2=91=A1ToDo=E3=82=92=E8=BF=BD=E5=8A=A0=EF=BC=88=E3=82=AB?= =?UTF-8?q?=E3=83=AC=E3=83=B3=E3=83=80=E3=83=BC=E3=81=AB=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=E3=81=95=E3=81=9B=E3=82=8B=EF=BC=89=20=E2=91=A2=E3=82=BB?= =?UTF-8?q?=E3=83=83=E3=83=86=E3=82=A3=E3=83=B3=E3=82=B0=E3=83=A2=E3=83=BC?= =?UTF-8?q?=E3=83=89=E3=81=A7ToDo=E3=83=AA=E3=82=B9=E3=83=88=E4=B8=80?= =?UTF-8?q?=E8=A6=A7=E8=A1=A8=E7=A4=BA=E3=81=AE=E7=8A=B6=E6=85=8B=E3=81=A7?= =?UTF-8?q?=E3=83=AA=E3=82=B9=E3=83=88=E9=81=B8=E6=8A=9E=E3=80=81=E3=80=8C?= =?UTF-8?q?=E5=89=8A=E9=99=A4=E3=80=8D=E3=83=9C=E3=82=BF=E3=83=B3=E6=8A=BC?= =?UTF-8?q?=E4=B8=8B=20=E2=91=A3=E3=82=AB=E3=83=AC=E3=83=B3=E3=83=80?= =?UTF-8?q?=E3=83=BC=E3=81=AE=E4=BA=88=E5=AE=9A=E3=81=8C=E5=89=8A=E9=99=A4?= =?UTF-8?q?=E3=81=95=E3=82=8C=E3=81=9A=E6=AE=8B=E3=81=A3=E3=81=A6=E3=81=84?= =?UTF-8?q?=E3=82=8B=E7=8A=B6=E6=85=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/webapp/modules/todo/action/dicon.ini | 3 ++- .../todo/action/edit/delete/Delete.class.php | 14 ++++++++++++++ .../modules/todo/action/edit/delete/maple.ini | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/html/webapp/modules/todo/action/dicon.ini b/html/webapp/modules/todo/action/dicon.ini index a22cc43..d94360c 100644 --- a/html/webapp/modules/todo/action/dicon.ini +++ b/html/webapp/modules/todo/action/dicon.ini @@ -1,3 +1,4 @@ [DIContainer] todoAction = "modules://todo.components.action" -todoView = "modules://todo.components.view" \ No newline at end of file +todoView = "modules://todo.components.view" +calendarPlanAction = "calendar.action" diff --git a/html/webapp/modules/todo/action/edit/delete/Delete.class.php b/html/webapp/modules/todo/action/edit/delete/Delete.class.php index bf49ca8..d2d0144 100644 --- a/html/webapp/modules/todo/action/edit/delete/Delete.class.php +++ b/html/webapp/modules/todo/action/edit/delete/Delete.class.php @@ -19,6 +19,7 @@ class Todo_Action_Edit_Delete extends Action // 使用コンポーネントを受け取るため var $todoAction = null; var $db = null; + var $calendarPlanAction = null; /** * Todo削除アクション @@ -27,6 +28,19 @@ class Todo_Action_Edit_Delete extends Action */ function execute() { + $whereParams = array( + "todo_id" => $this->todo_id, + "calendar_id!=0" => null + ); + $tasks = $this->db->selectExecute('todo_task', $whereParams); + if(!empty($tasks)) { + foreach($tasks as $task) { + if (!$this->calendarPlanAction->deletePlan($task["calendar_id"], CALENDAR_PLAN_EDIT_THIS)) { + return false; + } + } + } + $whereParams = array( "todo_id" => $this->todo_id ); diff --git a/html/webapp/modules/todo/action/edit/delete/maple.ini b/html/webapp/modules/todo/action/edit/delete/maple.ini index ba8de50..6bf5c35 100644 --- a/html/webapp/modules/todo/action/edit/delete/maple.ini +++ b/html/webapp/modules/todo/action/edit/delete/maple.ini @@ -6,6 +6,7 @@ key:room_id,block_id,todo_id.todo.todoExists = "1:lang._invalid_input" [Action] db = "ref:DbObject" +calendarPlanAction = "ref:calendarPlanAction" [View] success = "action:todo_view_edit_list" \ No newline at end of file