codesite2git: remove temporary variable from short description handling

This commit is contained in:
mappu 2020-05-04 18:06:35 +12:00
parent eeaf1c1dbf
commit 146f08dacd
2 changed files with 12 additions and 5 deletions

View File

@ -87,16 +87,16 @@ class CProjectGitExporter extends CProject {
// Extra properties file // Extra properties file
$ctime = $this->lastupdate - ($this->lifespan * 3600); // Lifespans are measured in hours $ctime = $this->lastupdate - ($this->lifespan * 3600); // Lifespans are measured in hours
$nice_shortdesc = $this->shortdesc;
if (strlen($nice_shortdesc) > 0) { if (strlen($this->shortdesc) > 0) {
$nice_shortdesc = rtrim($this->shortdesc, '.').'.'; $this->shortdesc = rtrim($this->shortdesc, '.').'.';
$nice_shortdesc[0] = strtoupper($nice_shortdesc[0]); $this->shortdesc[0] = strtoupper($this->shortdesc[0]);
} }
file_put_contents($dest.'/.legacy-codesite.toml', "# Converted with codesite2git file_put_contents($dest.'/.legacy-codesite.toml', "# Converted with codesite2git
project_name=".json_encode($this->projname)." project_name=".json_encode($this->projname)."
short_description=".json_encode($nice_shortdesc)." short_description=".json_encode($this->shortdesc)."
written_in_lang=".json_encode($this->subtag)." written_in_lang=".json_encode($this->subtag)."
topics=".json_encode($this->tags)." topics=".json_encode($this->tags)."
ctime=".$ctime." ctime=".$ctime."

View File

@ -4,7 +4,14 @@ class CProject {
protected $dir; protected $dir;
/**
* @var string $projname
*/
public $projname; public $projname;
/**
* @var string $shortdesc
*/
public $shortdesc = '(no description)'; public $shortdesc = '(no description)';
public $subtag = ''; public $subtag = '';
public $lastupdate = 0; public $lastupdate = 0;