Add Isbn, Rights and Publisher properties

This commit is contained in:
Didier Corbière 2013-09-13 00:08:15 +01:00
parent 63536d64d8
commit fd44d03d9a
3 ha cambiato i file con 20 aggiunte e 8 eliminazioni

Vedi File

@ -77,8 +77,9 @@ class BookExport
$this->mExport->SetProperty($i++, 'Description');
$this->mExport->SetProperty($i++, 'Subjects');
$this->mExport->SetProperty($i++, 'Cover');
$this->mExport->SetProperty($i++, 'Serie');
$this->mExport->SetProperty($i++, 'SerieIndex');
$this->mExport->SetProperty($i++, 'Isbn');
$this->mExport->SetProperty($i++, 'Rights');
$this->mExport->SetProperty($i++, 'Publisher');
$this->mExport->AddContent();
}
@ -95,8 +96,9 @@ class BookExport
$this->mExport->SetProperty($i++, $inBookInfo->mDescription);
$this->mExport->SetProperty($i++, implode(' - ', $inBookInfo->mSubjects));
$this->mExport->SetProperty($i++, $inBookInfo->mCover);
$this->mExport->SetProperty($i++, $inBookInfo->mSerie);
$this->mExport->SetProperty($i++, $inBookInfo->mSerieIndex);
$this->mExport->SetProperty($i++, $inBookInfo->mIsbn);
$this->mExport->SetProperty($i++, $inBookInfo->mRights);
$this->mExport->SetProperty($i++, $inBookInfo->mPublisher);
$this->mExport->AddContent();
}

Vedi File

@ -27,8 +27,9 @@ class BookInfos
public $mDescription = '';
public $mSubjects = null;
public $mCover = '';
public $mSerie = '';
public $mSerieIndex = '';
public $mIsbn = '';
public $mRights = '';
public $mPublisher = '';
/**
* Loads book infos from an epub file
@ -56,8 +57,9 @@ class BookInfos
$this->mDescription = $epub->Description();
$this->mSubjects = $epub->Subjects();
$this->mCover = $epub->getCoverItem();
$this->mSerie = $epub->Serie();
$this->mSerieIndex = $epub->SerieIndex();
$this->mIsbn = $epub->ISBN();
$this->mRights = $epub->Copyright();
$this->mPublisher = $epub->Publisher();
}
}

Vedi File

@ -42,11 +42,19 @@ class CsvExport extends BaseExport
$info = '';
if (is_array($value)) {
foreach ($value as $value1) {
// Escape quotes
if (strpos($value1, '\'') !== false) {
$value1 = '\'' . str_replace('\'', '\'\'', $value1) . '\'';
}
$text .= $value1 . self::CsvSeparator;
}
continue;
}
else {
// Escape quotes
if (strpos($value, '\'') !== false) {
$value = '\'' . str_replace('\'', '\'\'', $value) . '\'';
}
$info = $value;
}
$text .= $info . self::CsvSeparator;