* fix bugs #746,747.

This commit is contained in:
wangyidong
2015-10-08 15:52:49 +08:00
parent 0138d6f7f9
commit 2495cae340
7 changed files with 13 additions and 12 deletions

View File

@@ -439,7 +439,10 @@ class actionModel extends model
if(is_array($desc))
{
$extra = strtolower($action->extra);
/* Fix bug #741. */
if(isset($desc['extra'])) $desc['extra'] = $this->lang->$objectType->{$desc['extra']};
if(isset($desc['extra'][$extra]))
{
echo str_replace('$extra', $desc['extra'][$extra], $desc['main']);

View File

@@ -78,7 +78,7 @@ js::set('confirmDelete', $lang->user->confirmDelete);
<td><?php echo $user->visits;?></td>
<td class='text-left'>
<?php
common::printIcon('user', 'edit', "userID=$user->id&from=company", '', 'list');
common::printIcon('user', 'edit', "userID=$user->account&from=company", '', 'list');
if(strpos($this->app->company->admins, ",{$user->account},") === false and common::hasPriv('user', 'delete'))
{
echo html::a($this->createLink('user', 'delete', "userID=$user->id"), '<i class="icon-remove"></i>', '', "title='{$lang->user->delete}' class='btn-icon iframe'");

View File

@@ -147,12 +147,8 @@ class installModel extends model
*/
public function checkSessionSavePath()
{
if(preg_match('/WIN/i', PHP_OS))
{
$sessionSavePath = preg_replace("/\d;/", '', session_save_path());
return $result = (is_dir($sessionSavePath) and is_writable($sessionSavePath)) ? 'ok' : 'fail';
}
return 'ok';
$sessionSavePath = preg_replace("/\d;/", '', session_save_path());
return $result = (is_dir($sessionSavePath) and is_writable($sessionSavePath)) ? 'ok' : 'fail';
}
/**

View File

@@ -369,7 +369,7 @@ class my extends control
$this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->editProfile;
$this->view->position[] = $this->lang->my->editProfile;
$this->view->user = $this->user->getById($this->app->user->id);
$this->view->user = $this->user->getById($this->app->user->account);
$this->display();
}
@@ -392,7 +392,7 @@ class my extends control
$this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->changePassword;
$this->view->position[] = $this->lang->my->changePassword;
$this->view->user = $this->user->getById($this->app->user->id);
$this->view->user = $this->user->getById($this->app->user->account);
$this->display();
}

View File

@@ -137,7 +137,7 @@ class productplanModel extends model
public function update($planID)
{
$oldPlan = $this->getById($planID);
$plan = fixer::input('post')->stripTags($this->config->productplan->editor->edit['id'], $this->config->allowedTags)->get();
$plan = fixer::input('post')->stripTags($this->config->productplan->editor->edit['id'], $this->config->allowedTags)->remove('delta')->get();
$this->dao->update(TABLE_PRODUCTPLAN)
->data($plan)
->autoCheck()

View File

@@ -1594,7 +1594,9 @@ class project extends control
{
if(isset($_POST['storyIDList']))
{
foreach($this->post->storyIDList as $storyID)
$storyIDList = $this->post->storyIDList;
$_POST = array();
foreach($storyIDList as $storyID)
{
$this->project->unlinkStory($projectID, $storyID);
}

View File

@@ -326,7 +326,7 @@ class userModel extends model
$oldUser = $this->getById($userID);
$userID = (int)$userID;
$userID = $oldUser->id;
$user = fixer::input('post')
->setDefault('join', '0000-00-00')
->setIF($this->post->password1 != false, 'password', md5($this->post->password1))