diff --git a/lib/base/front/front.class.php b/lib/base/front/front.class.php index b5c2a680f6..64b2e7db32 100644 --- a/lib/base/front/front.class.php +++ b/lib/base/front/front.class.php @@ -802,7 +802,14 @@ class baseJS { global $app; - if($app->viewType == 'json') return json_encode(array('message' => $message)); + if($app->viewType == 'json') + { + $output = array(); + $output['data'] = json_encode(array('message' => $message)); + $output['md5'] = md5(json_encode(array('message' => $message))); + + return json_encode($output); + } return self::start($full) . "alert('" . $message . "')" . self::end() . self::resetForm(); } @@ -834,7 +841,15 @@ class baseJS { global $app; - if($app->viewType == 'json') return json_encode(array('message' => $message)); + if($app->viewType == 'json') + { + $output = array(); + $output['status'] = 'fail'; + $output['data'] = json_encode(array('message' => $message)); + $output['md5'] = md5(json_encode(array('message' => $message))); + + return json_encode($output); + } $alertMessage = ''; if(is_array($message)) @@ -882,11 +897,16 @@ class baseJS global $app; if($app->viewType == 'json') { - $output['message'] = $message; - $output['okURL'] = common::getSysURL() . $okURL; - $output['cancleURL'] = common::getSysURL() . $cancleURL; - $output['okTarget'] = $okTarget; - $output['cancleTarget'] = $cancleTarget; + $data = array(); + $data['message'] = $message; + $data['okURL'] = common::getSysURL() . $okURL; + $data['cancleURL'] = common::getSysURL() . $cancleURL; + $data['okTarget'] = $okTarget; + $data['cancleTarget'] = $cancleTarget; + + $output = array(); + $output['data'] = json_encode($data); + $output['md5'] = md5(json_encode($data)); return json_encode($output); } @@ -948,7 +968,16 @@ EOT; $url = $config->webRoot; } - if($app->viewType == 'json') return json_encode(array('locate' => common::getSysURL() . $url)); + if($app->viewType == 'json') + { + $data = strtolower($url) == 'back' ? array('locate' => 'back') : array('locate' => common::getSysURL() . $url); + + $output = array(); + $output['data'] = json_encode($data); + $output['md5'] = md5(json_encode($data)); + + return json_encode($output); + } $js = self::start(); if(strtolower($url) == "back") diff --git a/module/project/model.php b/module/project/model.php index 0dac802c00..3123842427 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -436,6 +436,8 @@ class projectModel extends model */ public function batchUpdate() { + $this->loadModel('user'); + $projects = array(); $allChanges = array(); $data = fixer::input('post')->get(); @@ -460,7 +462,6 @@ class projectModel extends model $projects[$projectID]->order = $data->orders[$projectID]; } - $this->loadModel('user'); foreach($projects as $projectID => $project) { $oldProject = $oldProjects[$projectID]; diff --git a/module/story/view/edit.html.php b/module/story/view/edit.html.php index a4b408d994..df9c81d698 100644 --- a/module/story/view/edit.html.php +++ b/module/story/view/edit.html.php @@ -11,6 +11,7 @@ */ ?> +product);?> children));?> story->moveChildrenTips);?>