* Fix bug.
This commit is contained in:
@@ -365,13 +365,14 @@ class file extends control
|
||||
if($_POST)
|
||||
{
|
||||
$this->app->loadLang('action');
|
||||
$file = $this->file->getByID($fileID);
|
||||
$data = fixer::input('post')->get();
|
||||
$this->dao->update(TABLE_FILE)->set('title')->eq($data->fileName)->where('id')->eq($fileID)->exec();
|
||||
$file = $this->file->getByID($fileID);
|
||||
$data = fixer::input('post')->get();
|
||||
$fileName = $data->fileName . '.' . $file->extension;
|
||||
$this->dao->update(TABLE_FILE)->set('title')->eq($fileName)->where('id')->eq($fileID)->exec();
|
||||
|
||||
$extension = "." . $file->extension;
|
||||
$actionID = $this->loadModel('action')->create($file->objectType, $file->objectID, 'editfile', '', $data->fileName . $extension);
|
||||
$changes[] = array('field' => 'fileName', 'old' => $file->title . $extension, 'new' => $data->fileName . $extension);
|
||||
$actionID = $this->loadModel('action')->create($file->objectType, $file->objectID, 'editfile', '', $fileName);
|
||||
$changes[] = array('field' => 'fileName', 'old' => $file->title . $extension, 'new' => $fileName);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
|
||||
die(js::reload('parent.parent'));
|
||||
|
||||
@@ -36,7 +36,7 @@ function closeWindow()
|
||||
<tr>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input('fileName', $file->title, "class='form-control' autocomplete='off'");?>
|
||||
<?php echo html::input('fileName', rtrim($file->title, '.' . $file->extension), "class='form-control' size='40' autocomplete='off'");?>
|
||||
<strong class='input-group-addon'>.<?php echo $file->extension;?></strong>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user