Merge branch 'master' of github.com:easysoft/zentaopms

This commit is contained in:
xia0ta0
2013-09-10 13:43:24 +08:00
37 changed files with 18 additions and 22 deletions

View File

@@ -694,7 +694,7 @@ class router
elseif(isset($_COOKIE['lang']))
{
$this->clientLang = $_COOKIE['lang'];
}
}
elseif(isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))
{
if(strpos($_SERVER['HTTP_ACCEPT_LANGUAGE'], ',') === false)

0
module/action/config.php Normal file → Executable file
View File

0
module/action/control.php Normal file → Executable file
View File

0
module/action/css/trash.css Normal file → Executable file
View File

0
module/action/ext/config/.gitkeep Normal file → Executable file
View File

0
module/action/ext/control/.gitkeep Normal file → Executable file
View File

0
module/action/ext/css/.gitkeep Normal file → Executable file
View File

0
module/action/ext/js/.gitkeep Normal file → Executable file
View File

0
module/action/ext/lang/en/.gitkeep Normal file → Executable file
View File

0
module/action/ext/lang/zh-cn/.gitkeep Normal file → Executable file
View File

0
module/action/ext/lang/zh-tw/.gitkeep Normal file → Executable file
View File

0
module/action/ext/model/.gitkeep Normal file → Executable file
View File

0
module/action/ext/view/.gitkeep Normal file → Executable file
View File

0
module/action/lang/en.php Normal file → Executable file
View File

0
module/action/lang/zh-cn.php Normal file → Executable file
View File

0
module/action/lang/zh-tw.php Normal file → Executable file
View File

2
module/action/model.php Normal file → Executable file
View File

@@ -39,7 +39,7 @@ class actionModel extends model
$action->actor = $actor ? $actor : $this->app->user->account;
$action->action = strtolower($actionType);
$action->date = helper::now();
$action->comment = ltrim($comment, "<br />");
$action->comment = trim(strip_tags($comment)) ? $comment : '';
$action->extra = $extra;
/* Get product and project for this object. */

0
module/action/view/trash.html.php Normal file → Executable file
View File

View File

@@ -36,8 +36,8 @@ function loadAll(productID)
if(!changeProductConfirmed)
{
firstChoice = confirm(confirmChangeProduct);
changeProductConfirmed = true; // Only notice the user one time.
firstChoice = confirm(confirmChangeProduct);
changeProductConfirmed = true; // Only notice the user one time.
}
if(changeProductConfirmed || firstChoice)
{
@@ -221,7 +221,7 @@ function notice()
{
if($('#project').val() == '')
{
$('#buildBox').append('<a href="' + createLink('release', 'create','productID=' + $('#product').val()) + '" target="_blank">' + createRelease + '</a>');
$('#buildBox').append('<a href="' + createLink('release', 'create','productID=' + $('#product').val()) + '" target="_blank">' + createRelease + ' </a>');
$('#buildBox').append('<a href="javascript:loadProductBuilds(' + $('#product').val() + ')">' + refresh + '</a>');
}
else

View File

@@ -302,8 +302,7 @@ class file extends control
{
if($_POST)
{
$data = $this->file->pasteImage($this->post->editor);
echo str_replace('\"', '"', $data);
echo $this->file->pasteImage($this->post->editor);
}
}
}

View File

@@ -249,8 +249,10 @@ class fileModel extends model
*/
public function pasteImage($data)
{
$data = str_replace('\"', '"', $data);
ini_set('pcre.backtrack_limit', strlen($data));
preg_match_all('/<img src=\\\"(data:image\/(\S+);base64,(\S+))\\\" .+ \/>/U', $data, $out);
preg_match_all('/<img src="(data:image\/(\S+);base64,(\S+))" .+ \/>/U', $data, $out);
foreach($out[3] as $key => $base64Image)
{
$imageData = base64_decode($base64Image);

View File

View File

View File

View File

View File

View File

View File

View File

@@ -556,8 +556,8 @@ class gitModel extends model
foreach($actionFiles as $file)
{
$param = array('url' => helper::safe64Encode($repoRoot . $file), 'revision' => $log->revision);
$catLink = trim(html::a(helper::createLink('git', 'cat', $param, 'html'), 'view', '', "class='gitlink'"));
$diffLink = trim(html::a(helper::createLink('git', 'diff', $param, 'html'), 'diff', '', "class='gitlink'"));
$catLink = trim(html::a(helper::createLink('git', 'cat', $param, 'html'), 'view', '', "class='repolink'"));
$diffLink = trim(html::a(helper::createLink('git', 'diff', $param, 'html'), 'diff', '', "class='repolink'"));
$diff .= $action . " " . $file . " $catLink ";
$diff .= $action == 'M' ? "$diffLink\n" : "\n" ;
}

View File

@@ -204,7 +204,7 @@ class settingModel extends model
*/
public function updateVersion($version)
{
return $this->setItem('system.common.global.version', $version, 0);
return $this->setItem('system.common.global.version', $version);
}
/**

View File

@@ -11,7 +11,6 @@
*/
?>
<?php include './header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<form method='post' enctype='multipart/form-data' target='hiddenwin'>
<table class='table-1'>
<caption><?php echo $lang->story->change;?></caption>

View File

@@ -11,7 +11,6 @@
*/
?>
<?php include './header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php include '../../common/view/form.html.php';?>
<?php js::set('holders', $lang->story->placeholder); ?>
<form method='post' enctype='multipart/form-data' id='dataform' class='ajaxForm'>

View File

@@ -11,7 +11,6 @@
*/
?>
<?php include './header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<form method='post' enctype='multipart/form-data' target='hiddenwin' id='dataform'>
<div id='titlebar'>
<div id='main'>STORY #<?php echo $story->id . $lang->colon . $story->title;?></div>

View File

@@ -1,5 +1,4 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/chosen.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<script language='Javascript'>
function loadProduct(productID)

View File

@@ -11,7 +11,6 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<div id='titlebar'>
<div id='main' <?php if($story->deleted) echo "class='deleted'";?>>STORY #<?php echo $story->id . ' ' . $story->title;?>
<?php if($story->version > 1):?>

View File

@@ -549,8 +549,8 @@ class svnModel extends model
foreach($actionFiles as $file)
{
$param = array('url' => helper::safe64Encode($repoRoot . $file), 'revision' => $log->revision);
$catLink = trim(html::a(helper::createLink('svn', 'cat', $param, 'html'), 'view', '', "class='svnlink'"));
$diffLink = trim(html::a(helper::createLink('svn', 'diff', $param, 'html'), 'diff', '', "class='svnlink'"));
$catLink = trim(html::a(helper::createLink('svn', 'cat', $param, 'html'), 'view', '', "class='repolink'"));
$diffLink = trim(html::a(helper::createLink('svn', 'diff', $param, 'html'), 'diff', '', "class='repolink'"));
$diff .= $action . " " . $file . " $catLink ";
$diff .= $action == 'M' ? "$diffLink\n" : "\n" ;
}

View File

@@ -531,14 +531,14 @@ function setImageSize(image, maxWidth)
}
/**
* Set the subversion link.
* Set the repo link.
*
* @access public
* @return void
*/
function setSubversionLink()
function setRepoLink()
{
if($('.svnlink').size()) $('.svnlink').colorbox({width:960, height:600, iframe:true, transition:'elastic', speed:350, scrolling:true});
if($('.repolink').size()) $('.repolink').colorbox({width:960, height:600, iframe:true, transition:'elastic', speed:350, scrolling:true});
}
/* Set the colorbox of export. */
@@ -917,7 +917,7 @@ $(document).ready(function()
setAbout();
setQRCode();
setExport();
setSubversionLink();
setRepoLink();
autoCheck();
toggleSearch();