* fix bugs.
This commit is contained in:
@@ -152,7 +152,7 @@ class fileModel extends model
|
||||
public function getExtension($filename)
|
||||
{
|
||||
$extension = trim(strtolower(pathinfo($filename, PATHINFO_EXTENSION)));
|
||||
if(strpos($this->config->file->dangers, $extension) !== false) return 'txt';
|
||||
if(empty($extension) or strpos($this->config->file->dangers, $extension) !== false) return 'txt';
|
||||
if($extension == 'php') return 'txt';
|
||||
return $extension;
|
||||
}
|
||||
|
||||
@@ -348,12 +348,11 @@ class gitModel extends model
|
||||
public function iconvComment($comment)
|
||||
{
|
||||
/* Get encodings. */
|
||||
$encodings = str_replace(' ', '', trim($comment));
|
||||
if($encodings == '') return $comment;
|
||||
$encodings = explode(',', $encodings);
|
||||
$encoding = str_replace(' ', '', $this->config->git->encodings);
|
||||
if($encoding == '') return $comment;
|
||||
|
||||
/* Try convert. */
|
||||
foreach($encodings as $encoding)
|
||||
if($encoding != 'utf-8')
|
||||
{
|
||||
$result = @iconv($encoding, 'utf-8', $comment);
|
||||
if($result) return $result;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*
|
||||
*/
|
||||
$config->svn = new stdClass();
|
||||
$config->svn->encodings = 'utf-8, gbk';
|
||||
$config->svn->encodings = 'utf-8';
|
||||
$config->svn->client = '';
|
||||
|
||||
$i = 1;
|
||||
|
||||
@@ -429,10 +429,11 @@ class task extends control
|
||||
*/
|
||||
public function view($taskID)
|
||||
{
|
||||
$task = $this->task->getById($taskID, true);
|
||||
$task = $this->task->getById($taskID, true);
|
||||
if(!$task) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
|
||||
$story = $this->story->getById($task->story);
|
||||
$task->storySpec = ($story != null) ? $story->spec : '';
|
||||
if(!$task) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
|
||||
/* Update action. */
|
||||
if($task->assignedTo == $this->app->user->account) $this->loadModel('action')->read('task', $taskID);
|
||||
|
||||
@@ -56,4 +56,10 @@
|
||||
<div id='querybox' class='<?php if($browseType =='bysearch') echo 'show';?>'></div>
|
||||
</div>
|
||||
|
||||
<?php foreach(glob(dirname(dirname(__FILE__)) . "/ext/view/featurebar.*.html.hook.php") as $fileName) include_once $fileName; ?>
|
||||
<?php
|
||||
$headerHooks = glob(dirname(dirname(__FILE__)) . "/ext/view/featurebar.*.html.hook.php");
|
||||
if($headerHooks)
|
||||
{
|
||||
foreach($headerHooks as $fileName) helper::import($fileName);
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user