Skip to content
Snippets Groups Projects
Commit 967f1a34 authored by Ghislain Loas's avatar Ghislain Loas
Browse files

dev #17514 domain indexation

test fix
parent a60f7128
Branches
Tags
4 merge requests!715Master,!686Dev#17514 indexation refactoring,!649Dev#19675 improve display articles and sito in kiosque,!630Dev#17514 indexation refactoring
......@@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
// OPAC3 - FLUX RSS
......@@ -246,7 +246,8 @@ class RssController extends Zend_Controller_Action
}
if (count($data_rss['items']) == 0)
$data_rss["items"][]= array('titre' => $this->view->_('Aucune donnée à modérer'));
$data_rss["items"][]= ['titre' => $this->view->_('Aucune donnée à modérer'),
'lien' => ''];
$this->getHelper('ViewRenderer')->setNoRender();
$this->getResponse()->setHeader('Content-Type', 'text/html;charset=utf-8') ;
......@@ -268,7 +269,7 @@ class RssController extends Zend_Controller_Action
$data_rss["description"] = $this->view->_("Critiques de la sélection: %s", $preferences['titre']);
$data_rss["lien"] = $profil->urlForModule('blog', 'viewcritiques', $id_module);
$data_rss["items"] = [];
$avis_helper = $this->view->getHelper('Avis');
foreach($liste_avis as $avis) {
if (!$avis->hasFirstNotice())
......@@ -314,7 +315,7 @@ class RssController extends Zend_Controller_Action
'desc' => '<![CDATA[' . $this->filtreNews($desc) . ']]>',
'pubDate' => strtotime($avis->getDateAvis())];
}
$data_rss = ['titre' => sprintf('Avis de %s', $username),
'lien' => $this->view->absoluteUrl([
'controller' => 'blog',
......
......@@ -126,17 +126,6 @@ class Class_Notice_ClefAlpha {
}
/** to be deleted */
public function likeKeyWith($positions) {
$cle = [];
for($i=0; $i <=6; $i++) {
$cle []= in_array($i, $positions) ? $this->_clef[$i] : '%';
}
return implode(self::SEPARATOR, $cle);
}
public function numberOfMatchingElements($clef_alpha) {
return count(array_intersect($clef_alpha->_clef, $this->_clef));
}
......@@ -156,24 +145,6 @@ class Class_Notice_ClefAlpha {
return $current_notice;
}
public function getUniqueNoticeWithParams($search_params) {
$current_params = [];
foreach($search_params as $key => $value) {
$current_params[$key] = $value;
$notices = Class_Notice::findAllBy($current_params);
if (!$notices)
return null;
if (count($notices) === 1)
return $notices[0];
}
return null;
}
}
?>
\ No newline at end of file
......@@ -110,14 +110,14 @@ class Class_PanierNotice extends Storm_Model_Abstract {
return Class_NoticeDomain::deleteByCart($this->getId());
foreach($catalogues as $domain) {
if($delete = Class_NoticeDomain::findFirstBy(['domain_id' => $domain->getId(),
'panier_id' => $this->getId(),
'record_alpha_key' => Class_Indexation_PseudoNotice::getAlphaKey($notice)]))
$params = ['domain_id' => $domain->getId(),
'panier_id' => $this->getId(),
'record_alpha_key' => $notice->getClefAlpha()];
if($delete = Class_NoticeDomain::findFirstBy($params))
$delete->delete();
Class_NoticeDomain::newInstance(['domain_id' => $domain->getId(),
'record_alpha_key' => Class_Indexation_PseudoNotice::getAlphaKey($notice),
'panier_id' => $this->getId()])->save();
Class_NoticeDomain::newInstance($params)->save();
Class_NoticeDomain::updateRecordsFacette($domain->getId());
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment