diff --git a/html/maple/nccore/SecurityManager.class.php b/html/maple/nccore/SecurityManager.class.php
index 03fcff9..600a01d 100644
--- a/html/maple/nccore/SecurityManager.class.php
+++ b/html/maple/nccore/SecurityManager.class.php
@@ -126,7 +126,7 @@ function chkContamiAction($key)
{
// Variables contamination
if( $this->_config[_SECURITY_CONF_CATID]['contami_action']['conf_value'] &&
- in_array($key, $this->bad_globals) ) {
+ in_array($key, $this->bad_globals, true) ) {
$this->message = sprintf(_SECURITY_CONTAMI_ACTION_ERROR, $key);
$user_id = $this->_session->getParameter("_user_id");
$this->outputLog( 'CONTAMI', $user_id) ;
diff --git a/html/maple/nccore/db/DbObjectAdodb.class.php b/html/maple/nccore/db/DbObjectAdodb.class.php
index 81c7e25..8258c9e 100644
--- a/html/maple/nccore/db/DbObjectAdodb.class.php
+++ b/html/maple/nccore/db/DbObjectAdodb.class.php
@@ -916,8 +916,10 @@ function addError($error_no=null, $error_mes=null)
$session =& $container->getComponent("Session");
if(isset($session) && $session->getParameter("_php_debug") == _ON) {
$errorList->add($this->ErrorNo(), $this->ErrorMsg(). ":\n". $this->_bck_sql);
- } else {
+ } else if (defined('_INVALID_INPUT')) {
$errorList->add($this->ErrorNo(), _INVALID_INPUT);
+ } else {
+ $errorList->add($this->ErrorNo(), "Security Error! Unauthorized input.");
}
} else {
$errorList->add($error_no, $error_mes);
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)) {
diff --git a/html/webapp/components/monthlynumber/View.class.php b/html/webapp/components/monthlynumber/View.class.php
index 2414e19..b7e8c9c 100644
--- a/html/webapp/components/monthlynumber/View.class.php
+++ b/html/webapp/components/monthlynumber/View.class.php
@@ -144,33 +144,33 @@ function getMonthlyNumberList($year, $room_id = null, $user_id = null, $role_aut
}
//$_user_auth_id = $session->getParameter("_user_auth_id");
- if($room_id != null) {
- //ルーム管理:ルーム毎のSUM
- $params = array(
- //"user_id"=>$user_id,
- "room_id"=>$room_id
- //"sub_room_id"=>$room_id
- );
- $sql = "SELECT {pages}.page_id,{pages}.root_id, {pages}.parent_id,{pages}.thread_num, {pages}.display_sequence, {pages}.page_name, {pages}.private_flag, {pages}.space_type, {monthly_number}.name, {monthly_number}.year, {monthly_number}.month, SUM({monthly_number}.number) AS number " .
- " FROM {pages} ";
+ if($room_id != null) {
+ //ルーム管理:ルーム毎のSUM
+ $params = array(
+ //"user_id"=>$user_id,
+ "room_id"=>$room_id
+ //"sub_room_id"=>$room_id
+ );
+ $sql = "SELECT {pages}.page_id,{pages}.root_id, {pages}.parent_id,{pages}.thread_num, {pages}.display_sequence, {pages}.page_name, {pages}.private_flag, {pages}.space_type, {monthly_number}.name, {monthly_number}.year, {monthly_number}.month, SUM({monthly_number}.number) AS number " .
+ " FROM {pages} ";
$sql .= " LEFT JOIN {monthly_number} ON {pages}.room_id = {monthly_number}.room_id ";
//$sql .= " LEFT JOIN {pages_users_link} ON {pages}.room_id = {pages_users_link}.room_id AND {pages_users_link}.room_id = ? ";
- $sql .= " WHERE 1=1 ";
+ $sql .= " WHERE 1=1 ";
- } else {
- $params = array(
- "user_id"=>$user_id,
- "user_id_monthly"=>$user_id
- );
+ } else {
+ $params = array(
+ "user_id"=>$user_id,
+ "user_id_monthly"=>$user_id
+ );
$sql = "SELECT {pages}.page_id, {pages}.root_id, {pages}.parent_id, {pages}.thread_num, {pages}.display_sequence, {pages}.page_name, {pages}.private_flag, {pages}.space_type, {monthly_number}.name, {monthly_number}.year, {monthly_number}.month, {monthly_number}.number " .
- " FROM {pages} ";
+ " FROM {pages} ";
$sql .= " LEFT JOIN {monthly_number} ON {pages}.room_id = {monthly_number}.room_id AND {monthly_number}.user_id = ? ";
- $sql .= " LEFT JOIN {pages_users_link} ON {pages}.room_id = {pages_users_link}.room_id AND {pages_users_link}.user_id = ? ";
+ $sql .= " LEFT JOIN {pages_users_link} ON {pages}.room_id = {pages_users_link}.room_id AND {pages_users_link}.user_id = ? ";
- $sql .= " WHERE (({pages}.private_flag = "._ON." " .
- "AND {pages_users_link}.user_id IS NOT NULL) OR ({pages}.private_flag = "._OFF." AND ({pages}.space_type = "._SPACE_TYPE_GROUP." OR {pages}.space_type ="._SPACE_TYPE_PUBLIC."))) ";
- }
+ $sql .= " WHERE (({pages}.private_flag = "._ON." " .
+ "AND {pages_users_link}.user_id IS NOT NULL) OR ({pages}.private_flag = "._OFF." AND ({pages}.space_type = "._SPACE_TYPE_GROUP." OR {pages}.space_type ="._SPACE_TYPE_PUBLIC."))) ";
+ }
//ルームのみ
$sql .= " AND {pages}.node_flag = ". _ON . " AND {pages}.room_id = {pages}.page_id ";
@@ -237,11 +237,11 @@ function _fetchcallbackMonthlyNumberList($result, $func_params) {
// name, thread_num, parent_id, display_sequence
$monthly_row_exists["nc".$row['name']][$row['page_id']] = true;
- if(!empty($monthly_list["nc".$row['name']][$row['page_id']][$row['month']])) {
- $monthly_list["nc".$row['name']][$row['page_id']][$row['month']] = $monthly_list["nc".$row['name']][$row['page_id']][$row['month']] + intval($row['number']);
- } else {
+ //if(!empty($monthly_list["nc".$row['name']][$row['page_id']][$row['month']])) {
+ // $monthly_list["nc".$row['name']][$row['page_id']][$row['month']] = $monthly_list["nc".$row['name']][$row['page_id']][$row['month']] + intval($row['number']);
+ //} else {
$monthly_list["nc".$row['name']][$row['page_id']][$row['month']] = intval($row['number']);
- }
+ //}
if($room_id == 0) {
//root_id,parent_idしか考慮しないため、サブグループが2つ以上作れる仕様にしてしまうと
diff --git a/html/webapp/config/define.inc.php b/html/webapp/config/define.inc.php
index 9ee87b0..b78f962 100644
--- a/html/webapp/config/define.inc.php
+++ b/html/webapp/config/define.inc.php
@@ -9,6 +9,9 @@
} else if (stristr($_SERVER['HTTP_USER_AGENT'], 'Windows')) {
// Windowsの場合
$encode = 'SJIS-win';
+ if (!extension_loaded('mbstring') && !function_exists("mb_convert_encoding")) {
+ $encode = 'SJIS';
+ }
} else {
$encode = _CHARSET;
}
diff --git a/html/webapp/modules/common/files/js/prototype.js b/html/webapp/modules/common/files/js/prototype.js
index 1999240..7f76192 100644
--- a/html/webapp/modules/common/files/js/prototype.js
+++ b/html/webapp/modules/common/files/js/prototype.js
@@ -343,7 +343,7 @@ var Enumerable = {
} catch (e) {
/* add Code 2011/04/21 Windows7 64bitOS IE9でWYSIWYGにカーソルを移動し、画面遷移し、再度、WYSIWYGを表示する際にエラーとなるため
* こちらでエラーを表示しないようにして対応 */
- if(!(browser.isIE && browser.version >= 9)) {
+ if(!(browser.isIE && browser.version >= 9) && !browser.isEdge) {
if (e != $break) throw e;
}
}
@@ -2966,7 +2966,9 @@ function Browser() {
this.isFirefox = false; // FireFox
this.isOpera = false;
this.isSafari = false;
- this.version = null;
+ this.isEdge = false;
+
+ this.version = null;
ua = navigator.userAgent;
@@ -2984,6 +2986,15 @@ function Browser() {
return;
}
+ s = "Edge";
+ if ((i = ua.indexOf(s)) >= 0) {
+ this.isEdge = true;
+ this.isGecko = true;
+ this.isSafari = true;
+ //this.version = parseFloat(ua.substr(i + s.length));
+ return;
+ }
+
// IE11
s = "Trident";
if ((i = ua.indexOf(s)) >= 0) {
diff --git a/html/webapp/modules/comp/files/js/comp_popup.js b/html/webapp/modules/comp/files/js/comp_popup.js
index dbb5ce2..a0e9606 100644
--- a/html/webapp/modules/comp/files/js/comp_popup.js
+++ b/html/webapp/modules/comp/files/js/comp_popup.js
@@ -364,7 +364,7 @@ compPopup.prototype = {
}
if((browser.isIE && browser.version < 9)) iframe.style.display = "none"; //safariの場合、再描画する時に描画処理がはしってしまうためコメント
iframe.style.visibility = "hidden";
- if(browser.isOpera) {
+ if(browser.isOpera || browser.isEdge) {
$(this.popupElement).remove();
this.src = null;
this.popupElement = null;
diff --git a/html/webapp/modules/comp/files/js/plugins/comp_textareamain.js b/html/webapp/modules/comp/files/js/plugins/comp_textareamain.js
old mode 100755
new mode 100644
index d5961d6..3c636c0
--- a/html/webapp/modules/comp/files/js/plugins/comp_textareamain.js
+++ b/html/webapp/modules/comp/files/js/plugins/comp_textareamain.js
@@ -338,7 +338,7 @@ compTextareamain.prototype = {
exec : function()
{
var self = this;
- if(browser.isIE) {
+ if(browser.isIE || browser.isEdge) {
var spans, font, loop_flag = true;
var f = self.currentNode ? self.currentNode : self.getSelectNode();
// 選択NodeTopをselect
@@ -358,7 +358,7 @@ compTextareamain.prototype = {
return;
}
f = self.applyInlineStyle('font');
- } else if(f.style.color != '' || f.style.backgroundColor != '' || f.style.fonSize != '' || f.style.fontFamily != '') {
+ } else if(f.style.color || f.style.backgroundColor || f.style.fonSize || f.style.fontFamily) {
font = this.editorDoc.createElement('font');
f = self.replace(font, f, true);
}
@@ -395,7 +395,7 @@ compTextareamain.prototype = {
}
}
this.editorDoc.execCommand('removeFormat', false, []);
- if(browser.isSafari && f.nodeName.toLowerCase() != "body") {
+ if(browser.isSafari && f.nodeName.toLowerCase() != "body" && !browser.isEdge) {
// Class Apple-style-spanを検索し、削除
var remove_el_arr = [];
var buf_f = f;
@@ -460,7 +460,35 @@ compTextareamain.prototype = {
}
} else {
var sel_n = null;
- this.editorDoc.execCommand(name, false, []);
+ if(!browser.isEdge)
+ this.editorDoc.execCommand(name, false, []);
+ else {
+ var n = this.currentNode ? this.currentNode : this.getSelectNode();
+ var r = this.getRange();
+ if(n && n.nodeName.toLowerCase() != 'div') {
+ if(r.startContainer && r.endContainer &&
+ r.startContainer == r.endContainer) {
+
+ var br = r.startContainer.nextSibling;
+ if(!br) {
+ br = this.editorDoc.createTextNode("");
+ r.insertNode(br);
+ br = br.nextSibling;
+ r.setStartBefore(br);
+ } else {
+ r.setStartBefore(r.startContainer);
+ }
+ r.setEndAfter(br);
+ this.setRange(r);
+ }
+ n = this.applyInlineStyle('div');
+ if(n) {
+ this.rangeSelect(n, 1);
+ }
+ }
+ this.editorDoc.execCommand(name, false, []);
+ }
+
var r = this.getRange();
if(r.endContainer && r.endContainer.parentNode) {
sel_n = r.endContainer.parentNode;
@@ -488,37 +516,33 @@ compTextareamain.prototype = {
value : {
insertOrderedList : { visible : true, tags : ['ol'],
exec : function(e) {
- // IE10以下で全角入力をすると、先頭の文字が2行目にも表示されるため修正
-// if(!browser.isIE)
-// this.editorDoc.execCommand("insertOrderedList", false, []);
-// else {
-// var n = this.applyInlineStyle('div');
-// this.rangeSelect(n);
-// this.editorDoc.execCommand("insertOrderedList", false, []);
-// if(n && n.parentNode) {
-// this.insertBefore(n, n.innerHTML)
-// n.parentNode.removeChild(n);
-// }
-// }
- this.editorDoc.execCommand("insertOrderedList", false, []);
+ if(!browser.isIE && !browser.isEdge)
+ this.editorDoc.execCommand("insertOrderedList", false, []);
+ else {
+ var n = this.applyInlineStyle('div');
+ this.rangeSelect(n);
+ this.editorDoc.execCommand("insertOrderedList", false, []);
+ if(n && n.parentNode) {
+ this.insertBefore(n, n.innerHTML)
+ n.parentNode.removeChild(n);
+ }
+ }
this.checkTargets();
}
},
insertUnorderedList : { visible : true, tags : ['ul'],
exec : function(e) {
- // IE10以下で全角入力をすると、先頭の文字が2行目にも表示されるため修正
-// if(!browser.isIE)
-// this.editorDoc.execCommand("insertUnorderedList", false, []);
-// else {
-// var n = this.applyInlineStyle('div');
-// this.rangeSelect(n);
-// this.editorDoc.execCommand("insertUnorderedList", false, []);
-// if(n && n.parentNode) {
-// this.insertBefore(n, n.innerHTML)
-// n.parentNode.removeChild(n);
-// }
-// }
- this.editorDoc.execCommand("insertUnorderedList", false, []);
+ if(!browser.isIE && !browser.isEdge)
+ this.editorDoc.execCommand("insertUnorderedList", false, []);
+ else {
+ var n = this.applyInlineStyle('div');
+ this.rangeSelect(n);
+ this.editorDoc.execCommand("insertUnorderedList", false, []);
+ if(n && n.parentNode) {
+ this.insertBefore(n, n.innerHTML)
+ n.parentNode.removeChild(n);
+ }
+ }
this.checkTargets();
}
}
@@ -781,7 +805,6 @@ compTextareamain.prototype = {
callback : function(args) {
var a, bm, v;
// リンク挿入
- self.removeDialog(self.dialog_id);
self.addFocus(true);
if(n && n.nodeName.toLowerCase() != 'a') {
bm = self.bookmark;
@@ -812,6 +835,7 @@ compTextareamain.prototype = {
n.setAttribute(key,args[key],0);
a = n;
}
+ self.removeDialog(self.dialog_id);
self.rangeSelect(a);
self.addUndo();
@@ -1151,7 +1175,8 @@ compTextareamain.prototype = {
Event.observe(this.editorDoc,"mouseup", function(e) {
self.bookmark = self.getBookmark(); // IEはbookmarkを保持しないため
- self.currentNode = self.getSelectNode();
+ if (!browser.isEdge)
+ self.currentNode = self.getSelectNode();
self.checkTargets(Event.element(e));
self.addUndo();
self.closeDialogs();
@@ -1163,7 +1188,7 @@ compTextareamain.prototype = {
}, false, this.id);
Event.observe(this.editorDoc,"keydown", function(e) {
- if(browser.isSafari && (e.keyCode == 46 || e.keyCode == 8)) {
+ if(browser.isSafari && (e.keyCode == 46 || e.keyCode == 8) && !browser.isEdge) {
// 1行選択してdelete(backspace)ボタン、
// または、1行にわたるNodeを選択してdelete(backspace)
// ボタンを押すと、そのelementが削除されないため対処
@@ -1278,7 +1303,8 @@ compTextareamain.prototype = {
Event.observe(this.editorDoc,"keyup", function(e) {
var k = e.keyCode;
self.bookmark = self.getBookmark(); // IEはbookmarkを保持しないため
- self.currentNode = self.getSelectNode();
+ if (!browser.isEdge)
+ self.currentNode = self.getSelectNode();
if ((k >= 33 && k <= 36) || (k >= 37 && k <= 40) || k == 13 || k == 45 || k == 46 || k == 8 ||
(e.ctrlKey && (k == 86 || k == 88)) || k.ctrlKey || (this.is_mac && (k == 91 || k == 93))) {
// enter、上下左右、baskspace, Delキー,カット&ペーストならば、checkTargetsを呼び出す
@@ -1760,6 +1786,11 @@ compTextareamain.prototype = {
self.resize.parentNode.removeChild(self.resize);
Event.stopObserving(document,"mousemove", resizeMouseMove,false);
Event.stopObserving(document,"mouseup", resizeMouseUp,false);
+ if (browser.isIE && document.removeEventListener) {
+ // 画像アップロードのポップアップを2度表示すると、イベントが止まらなくなるため、原因不明だが手動で停止
+ document.removeEventListener("mousemove", resizeMouseMove,false);
+ document.removeEventListener("mouseup", resizeMouseUp,false);
+ }
(mode != "html") ? Element.setStyle(self.editor, {display:'block'}) : Element.setStyle(self.original, {display:'block'});
self._setStyleWithCSS();
@@ -1963,11 +1994,14 @@ compTextareamain.prototype = {
var path = document.getElementById('path_'+ this.top_id);
path.innerHTML = '';
path.appendChild(spn);
- var n_el = el, buf_n;
+ var n_el = el, buf_n,currentNode;
do {
nodeN = el.nodeName.toLowerCase();
- if ( el.nodeType != 1 || nodeN == 'body' || nodeN == 'html')
+ if ( el.nodeType != 1 || nodeN == 'body' || nodeN == 'html')
break;
+ if(!currentNode) {
+ currentNode = el;
+ }
if(nodeN == "b")
nodeN = "strong";
@@ -2009,6 +2043,8 @@ compTextareamain.prototype = {
pa = a;
t++;
} while ( el = el.parentNode );
+ if (browser.isEdge)
+ self.currentNode = currentNode;
},
checkTargets : function( element )
@@ -3647,14 +3683,18 @@ compTextareamain.prototype = {
function replaceFonts() {
var bm, c_el, r_el;
- var tags = new Array('span', 'font', 'img');
+ if (!browser.isEdge) {
+ var tags = new Array('span', 'font', 'img');
+ } else {
+ var tags = new Array('span', 'font', 'img', 'a');
+ }
var tags_length = tags.length;
for (var k = tags_length; k > 0; ) {
var target_ar = t.editorDoc.getElementsByTagName(tags[--k]);
var target_ar_length = target_ar.length;
for (var i = target_ar_length; i > 0; i--) {
var el = target_ar[i - 1];
- if (el.style.fontFamily == 'nc_wysiwygfont' || (el.face && el.face == 'nc_wysiwygfont') || (el.src && el.src.match(/nc_wysiwygurl$/))) {
+ if (el.style.fontFamily == 'nc_wysiwygfont' || (el.face && el.face == 'nc_wysiwygfont') || (el.src && el.src.match(/nc_wysiwygurl$/)) || (el.href && el.href.match(/nc_wysiwygurl$/))) {
if (!bm)
bm = t.getBookmark();
@@ -3665,8 +3705,9 @@ compTextareamain.prototype = {
spn.innerHTML = na;
c_el = spn.childNodes[0];
- } else
+ } else {
c_el = t.editorDoc.createElement(na);
+ }
if (!r_el)
r_el = c_el;
t.replace(t.attrs(c_el, at), el, 1);
@@ -3762,10 +3803,17 @@ compTextareamain.prototype = {
// Create inline elements
t.addFocus();
- if(collapsed)
+
+ var r = t.getRange();
+ if (r.collapsed && browser.isEdge) {
+ t.editorDoc.execCommand('inserthtml', false, '
');
+ } else if (collapsed) {
t.editorDoc.execCommand('insertImage', false, 'nc_wysiwygurl');
- else
+ } else if (browser.isEdge) {
+ t.editorDoc.execCommand('createLink', false, 'nc_wysiwygurl');
+ } else {
t.editorDoc.execCommand('fontName', false, 'nc_wysiwygfont');
+ }
r_el = replaceFonts();
if(t._keyhandler) {
Event.stopObserving(this.editorDoc,"keyup",t._keyhandler);
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
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
diff --git a/html/webapp/modules/user/action/admin/seldelete/Seldelete.class.php b/html/webapp/modules/user/action/admin/seldelete/Seldelete.class.php
index 730d879..440dd47 100644
--- a/html/webapp/modules/user/action/admin/seldelete/Seldelete.class.php
+++ b/html/webapp/modules/user/action/admin/seldelete/Seldelete.class.php
@@ -83,7 +83,9 @@ function execute()
continue;
}
}
-
+ if (!empty($this->select_user) && isset($this->delete_users[$user_id]) && $this->delete_users[$user_id] == _OFF) {
+ continue;
+ }
if (!empty($this->delete_users[$user_id])
|| !empty($this->select_user)) {
$targetUsers[] = $user_id;
diff --git a/html/webapp/modules/user/validator/Validator_ItemsInputs.class.php b/html/webapp/modules/user/validator/Validator_ItemsInputs.class.php
index 0d31c3e..dd70479 100644
--- a/html/webapp/modules/user/validator/Validator_ItemsInputs.class.php
+++ b/html/webapp/modules/user/validator/Validator_ItemsInputs.class.php
@@ -36,6 +36,7 @@ function validate($attributes, $errStr, $params)
$container =& DIContainerFactory::getContainer();
$session =& $container->getComponent("Session");
$usersView =& $container->getComponent("usersView");
+ $authoritiesView =& $container->getComponent("authoritiesView");
$_system_user_id = $session->getParameter("_system_user_id");
if(!isset($attributes['user_id'])) $attributes['user_id'] = "0";
@@ -131,6 +132,19 @@ function validate($attributes, $errStr, $params)
//システム管理者の場合、変更不可
if($attributes['user_id'] == $_system_user_id && $content != _SYSTEM_ROLE_AUTH_ID) {
return $err_prefix._INVALID_INPUT;
+ } else if ($content == _SYSTEM_ROLE_AUTH_ID && $session->getParameter("_user_auth_id") != _AUTH_ADMIN) {
+ // システム管理者へ権限を変更できるのは、管理者だけ
+ return $err_prefix._INVALID_INPUT;
+ }
+ $_user_auth_id = $session->getParameter("_user_auth_id");
+ $_role_auth_id = $session->getParameter("_role_auth_id");
+ $authority = $authoritiesView->getAuthorityByID($content);
+ if ($_user_auth_id == _AUTH_CHIEF && $authority["user_authority_id"] >= _AUTH_CHIEF) {
+ // 事務局が、主担、事務局以上
+ return $err_prefix._INVALID_INPUT;
+ } else if ($_user_auth_id == _AUTH_ADMIN && $_role_auth_id != _ROLE_AUTH_ADMIN && $authority["role_authority_id"] == _ROLE_AUTH_ADMIN) {
+ // 管理者がシステム管理者へ
+ return $err_prefix._INVALID_INPUT;
}
}
if($items['type'] == "email" || $items['type'] == "mobile_email") {
diff --git a/html/webapp/templates/main/mobile_smart.html b/html/webapp/templates/main/mobile_smart.html
index 4329aed..f1ef9ec 100644
--- a/html/webapp/templates/main/mobile_smart.html
+++ b/html/webapp/templates/main/mobile_smart.html
@@ -7,6 +7,11 @@
<{$smarty.const.INDEX_FILE_NAME}>?action=common_download_css&dir_name=/comp/extension/jquery.mobile-1.0.1.min.css&header=0&vs=<{$smarty.const._CSS_VERSION}>" />
<{$smarty.const.INDEX_FILE_NAME}>?action=common_download_css&dir_name=/comp/extension/jquery.mobile_addition.css&header=0&vs=<{$smarty.const._CSS_VERSION}>" />
+