* fix a bug for svn and adjust burn.
This commit is contained in:
@@ -168,10 +168,7 @@ class devModel extends model
|
||||
$comment = preg_split('/\r?\n\r?/', $comment);
|
||||
|
||||
// Trim asterisks and whitespace from the beginning and whitespace from the end of lines.
|
||||
$comment = array_map(function($line)
|
||||
{
|
||||
return ltrim(rtrim($line), "* \t\n\r\0\x0B");
|
||||
}, $comment);
|
||||
$comment = array_map(array('devModel', "trimSpace"), $comment);
|
||||
|
||||
// Group the lines together by @tags
|
||||
$blocks = array();
|
||||
@@ -246,4 +243,16 @@ class devModel extends model
|
||||
}
|
||||
return $modules;
|
||||
}
|
||||
|
||||
/**
|
||||
* Trim asterisks and whitespace from the beginning and whitespace from the end of lines.
|
||||
*
|
||||
* @param string $line
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function trimSpace($line)
|
||||
{
|
||||
return ltrim(rtrim($line), "* \t\n\r\0\x0B");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,10 +37,30 @@ class reportModel extends model
|
||||
public function createSingleJSON($sets, $dateList)
|
||||
{
|
||||
$data = '[';
|
||||
$now = date('Y-m-d');
|
||||
$preValue = '';
|
||||
$setsDate = array_keys($sets);
|
||||
foreach($dateList as $i => $date)
|
||||
{
|
||||
$date = date('Y-m-d', strtotime($date));
|
||||
$data .= isset($sets[$date]) ? "{$sets[$date]->value}," : "'',";
|
||||
if($date > $now) break;
|
||||
if(!isset($sets[$date]) and $sets)
|
||||
{
|
||||
$tmpDate = $setsDate;
|
||||
$tmpDate[] = $date;
|
||||
sort($tmpDate);
|
||||
$tmpDateStr = ',' . join(',', $tmpDate);
|
||||
$preDate = rtrim(substr($tmpDateStr, 0, strpos($tmpDateStr, $date)), ',');
|
||||
$preDate = substr($preDate, strrpos($preDate, ',') + 1);
|
||||
|
||||
if($preDate)
|
||||
{
|
||||
$preValue = $sets[$preDate];
|
||||
$preValue = $preValue->value;
|
||||
}
|
||||
}
|
||||
|
||||
$data .= isset($sets[$date]) ? "{$sets[$date]->value}," : "{$preValue},";
|
||||
}
|
||||
$data = rtrim($data, ',');
|
||||
$data .= ']';
|
||||
|
||||
@@ -440,7 +440,7 @@ class svnModel extends model
|
||||
foreach($this->config->svn->repos as $repo)
|
||||
{
|
||||
if(empty($repo['path'])) continue;
|
||||
if(strpos($url, $repo['path']) !== false) return (object)$repo;
|
||||
if(strpos(strtolower($url), strtolower($repo['path'])) !== false) return (object)$repo;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user