Petites corrections

This commit is contained in:
Michael RICOIS 2013-11-18 08:40:53 +00:00
parent b36a92a513
commit b26f2d84da
2 changed files with 39 additions and 28 deletions

View File

@ -371,6 +371,8 @@ class ReportController extends Zend_Controller_Action
$row = $commandM->fetchRow($where);
if ( $row!==null ) {
if ($row->eta == 0) {
$infos = new stdClass();
$infos->NumCommande = $row->cmdId;
$date = new Zend_Date($row->dateInsert);
@ -399,6 +401,8 @@ class ReportController extends Zend_Controller_Action
}
$this->view->links = $links;
}
}
}
@ -435,10 +439,13 @@ class ReportController extends Zend_Controller_Action
$c = Zend_Registry::get('config');
$source = $c->profil->path->data . DIRECTORY_SEPARATOR . $row->cmdId . '.html';
$dest = $c->profil->path->pages . DIRECTORY_SEPARATOR . $row->cmdId . '.html';
if ( copy($source, $dest) ) {
$wkthml = new Scores_Wkhtml_Pdf();
$file = $wkhtml->exec($dest);
}
$content = file_get_contents($source);
$content = preg_replace('@<link href="/@si','<link href="./',$content);
$content = preg_replace('@src="/@si','src="./',$content);
file_put_contents($dest, $content);
$pdf = new Scores_Wkhtml_Pdf();
$file = $pdf->exec($dest);
}

View File

@ -68,6 +68,10 @@ if(isset($opts->install))
APPLICATION_PATH.'/../library/Scores/Partner/Templates/pages '.
APPLICATION_PATH.'/../data/');
if (!file_exists($c->profil->path->pages.'/fichier/imgcache'))
passthru('ln -vs '.APPLICATION_PATH.'/../data/pages/imgcache'.' '.
$c->profil->path->pages.'/fichier/imgcache');
//Modification des permissions
passthru('chown -R www-data: '.APPLICATION_PATH.'/../');
}