Merge pull request #299 from frank-ulrich-weber/cleanUp
Smaller cleanups
This commit is contained in:
commit
62ab13d81b
|
@ -1469,11 +1469,7 @@ final class tx_dlf_document {
|
|||
'1'
|
||||
);
|
||||
|
||||
if ($GLOBALS['TYPO3_DB']->sql_num_rows($result)) {
|
||||
|
||||
list ($be_user) = $GLOBALS['TYPO3_DB']->sql_fetch_row($result);
|
||||
|
||||
} else {
|
||||
if (!$GLOBALS['TYPO3_DB']->sql_num_rows($result)) {
|
||||
|
||||
if (TYPO3_DLOG) {
|
||||
|
||||
|
|
|
@ -210,16 +210,12 @@ class tx_dlf_basket extends tx_dlf_plugin {
|
|||
|
||||
if ($GLOBALS['TYPO3_DB']->sql_num_rows($resultMail) > 0) {
|
||||
|
||||
$mails = array ();
|
||||
|
||||
$mailForm = '<select name="tx_dlf[mail_action]">';
|
||||
|
||||
$mailForm .= '<option value="">'.$this->pi_getLL('chooseMail', '', TRUE).'</option>';
|
||||
|
||||
while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resultMail)) {
|
||||
|
||||
$mails[] = $row;
|
||||
|
||||
$mailForm .= '<option value="'.$row['uid'].'">'.$row['name'].' ('.$row['mail'].')</option>';
|
||||
|
||||
}
|
||||
|
@ -255,16 +251,12 @@ class tx_dlf_basket extends tx_dlf_plugin {
|
|||
|
||||
if ($GLOBALS['TYPO3_DB']->sql_num_rows($resultPrinter) > 0) {
|
||||
|
||||
$printers = array ();
|
||||
|
||||
$printForm = '<select name="tx_dlf[print_action]">';
|
||||
|
||||
$printForm .= '<option value="">'.$this->pi_getLL('choosePrinter', '', TRUE).'</option>';
|
||||
|
||||
while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resultPrinter)) {
|
||||
|
||||
$printers[] = $row;
|
||||
|
||||
$printForm .= '<option value="'.$row['uid'].'">'.$row['label'].'</option>';
|
||||
|
||||
}
|
||||
|
@ -281,7 +273,7 @@ class tx_dlf_basket extends tx_dlf_plugin {
|
|||
if (isset($basketData['doc_ids'])) {
|
||||
|
||||
// get each entry
|
||||
foreach ($basketData['doc_ids'] as $key => $value) {
|
||||
foreach ($basketData['doc_ids'] as $value) {
|
||||
|
||||
$entries .= $this->getEntry($value, $subpartArray);
|
||||
|
||||
|
@ -321,7 +313,7 @@ class tx_dlf_basket extends tx_dlf_plugin {
|
|||
* Return one basket entry
|
||||
* @param array $data DocumentData
|
||||
* @param array $template Template information
|
||||
* @return Template
|
||||
* @return string
|
||||
*/
|
||||
public function getEntry($data, $template) {
|
||||
|
||||
|
@ -391,7 +383,7 @@ class tx_dlf_basket extends tx_dlf_plugin {
|
|||
|
||||
$markerArray['###NUMBER###'] = $docData['record_id'];
|
||||
|
||||
return $this->cObj->substituteMarkerArray($this->cObj->substituteSubpart($template['entry'], '###ENTRY###', $subpart, TRUE), $markerArray);
|
||||
return $this->cObj->substituteMarkerArray($this->cObj->substituteSubpart($template['entry'], '###ENTRY###', '', TRUE), $markerArray);
|
||||
|
||||
}
|
||||
|
||||
|
@ -551,7 +543,7 @@ class tx_dlf_basket extends tx_dlf_plugin {
|
|||
|
||||
}
|
||||
|
||||
foreach ($_piVars['selected'] as $key => $value) {
|
||||
foreach ($_piVars['selected'] as $value) {
|
||||
|
||||
if (isset($value['id'])) {
|
||||
|
||||
|
@ -607,18 +599,14 @@ class tx_dlf_basket extends tx_dlf_plugin {
|
|||
|
||||
$pdfUrl = $this->conf['pdfgenerate'];
|
||||
|
||||
foreach ($this->piVars['selected'] as $docId => $docValue) {
|
||||
foreach ($this->piVars['selected'] as $docValue) {
|
||||
|
||||
if ($docValue['id']) {
|
||||
|
||||
$filename .= $docValue['id'].'_';
|
||||
|
||||
$docData = $this->getDocumentData($docValue['id'], $docValue);
|
||||
|
||||
$pdfUrl .= $docData['urlParams'].$this->conf['pdfparamseparator'];
|
||||
|
||||
$numberOfPages += $docData['pageNums'];
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -755,7 +743,7 @@ class tx_dlf_basket extends tx_dlf_plugin {
|
|||
$pdfUrl = $this->conf['pdfdownload'];
|
||||
|
||||
// prepare links
|
||||
foreach ($this->piVars['selected'] as $docId => $docValue) {
|
||||
foreach ($this->piVars['selected'] as $docValue) {
|
||||
|
||||
if ($docValue['id']) {
|
||||
|
||||
|
@ -881,16 +869,12 @@ class tx_dlf_basket extends tx_dlf_plugin {
|
|||
|
||||
$pdfUrl = $printerData['print'];
|
||||
|
||||
$filename = 'Document_';
|
||||
|
||||
$numberOfPages = 0;
|
||||
|
||||
foreach ($this->piVars['selected'] as $docId => $docValue) {
|
||||
|
||||
if ($docValue['id']) {
|
||||
|
||||
$filename .= $docValue['id'].'_';
|
||||
|
||||
$explodeId = explode("_", $docId);
|
||||
|
||||
$docData = $this->getDocumentData($explodeId[0], $docValue);
|
||||
|
|
|
@ -808,8 +808,6 @@ class tx_dlf_search extends tx_dlf_plugin {
|
|||
|
||||
if ($count > 0) {
|
||||
|
||||
$hasValue = TRUE;
|
||||
|
||||
$entryArray['count']++;
|
||||
|
||||
if ($entryArray['ITEM_STATE'] == 'NO') {
|
||||
|
|
Loading…
Reference in New Issue