Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
No results found
Show changes
Commits on Source (73)
Showing
with 506 additions and 64 deletions
RewriteEngine on RewriteEngine on
RewriteCond %{REQUEST_URI} !/(xhprof_html|ckeditor|exploit|\.well-known) RewriteCond %{REQUEST_URI} !^/(xhprof_html|ckeditor|exploit|\.well-known)
RewriteCond %{REQUEST_FILENAME} !^.*/robots\.txt$ [NC] RewriteCond %{REQUEST_FILENAME} !^.*/robots\.txt$ [NC]
RewriteRule !(userfiles|public|tmp|temp|skins)/.*\.(js|ico|txt|gif|jpg|jpeg|png|css|xml|swf|mov|pdf|doc|docx|woff|woff2|eot|svg|ttf|xls|wsdl|mp3|m4v|ogg|ogv|epub|html|xhtml|asmx|zip|sql|bro|flv|mp4|webm|tgz|json|geojson)$ index.php [NC,NE] RewriteRule !(userfiles|public|tmp|temp|skins)/.*\.(js|ico|txt|gif|jpg|jpeg|png|css|xml|swf|mov|pdf|doc|docx|woff|woff2|eot|svg|ttf|xls|wsdl|mp3|m4v|ogg|ogv|epub|html|xhtml|asmx|zip|sql|bro|flv|mp4|webm|tgz|json|geojson)$ index.php [NC,NE]
......
15/03/2018 - v7.12.5 v7.12.6
- ticket #72835 : Explorateur de fichier : correction de la sélection d'une image lorsqu'on vient de la téléverser.
- ticket #72723 : Indexation : Correction de l'indexation d'articles liés à des domaines ayant été supprimés
12/03/2018 - v7.12.4
- ticket #72610 : OAuth : ajout d'une variable permettant l'utilisation du protocole OAuth en HTTP (OAUTH_ACCEPT_HTTP)
- ticket #72468 : Explorateur de fichiers : correction des boutons de redimensionnement lors de l'import.
- ticket #72468 : Explorateur de fichiers : amélioration du système de redirection après import ou supression de document.
- ticket #72437 : Charte graphique : suppression de règles css inutiles dans la charte "modèle"
- ticket #72297 : Cosmogramme : correction du système de dédoublonnage
08/03/2018 - v7.12.2 v7.12.3
- ticket #72242 : Article: insertion d'un kiosque de notices rendu possible à partir du role Rédacteur bibliothèque.
- ticket #71669 : Administration : ajout d'un tableau de bord pour les ressources numériques.
- ticket #72344 : Explorateur de fichier : Ajout de la vérification du format du nom de fichier téléversé
06/03/2018 - v7.12.1 06/03/2018 - v7.12.1
- ticket #72329 : Menu vertical : correction de la compatibilité du menu à bascule avec le responsive. - ticket #72329 : Menu vertical : correction de la compatibilité du menu à bascule avec le responsive.
......
- ticket #62394 : Webservice Koha : affichage des raisons des actions non possibles de prolongation et de réservation.
\ No newline at end of file
...@@ -42,7 +42,7 @@ class Admin_BatchController extends ZendAfi_Controller_Action { ...@@ -42,7 +42,7 @@ class Admin_BatchController extends ZendAfi_Controller_Action {
->save(); ->save();
$this->_helper->notify('Tâche activée'); $this->_helper->notify('Tâche activée');
$this->_redirectToIndex(); $this->_redirectToReferer();
} }
...@@ -55,7 +55,7 @@ class Admin_BatchController extends ZendAfi_Controller_Action { ...@@ -55,7 +55,7 @@ class Admin_BatchController extends ZendAfi_Controller_Action {
$batch->delete(); $batch->delete();
$this->_helper->notify('Tâche désactivée'); $this->_helper->notify('Tâche désactivée');
$this->_redirectToIndex(); $this->_redirectToReferer();
} }
......
<?php
/**
* Copyright (c) 2012-2017, Agence Française Informatique (AFI). All rights reserved.
*
* BOKEH is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* BOKEH is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* 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
*/
class Admin_CkeditorController extends ZendAfi_Controller_Action {
public function indexAction() {
return $this->_forward('index', 'index');
}
public function getFormAction() {
$module = Class_Systeme_ModulesAccueil::moduleByCode($this->_getParam('code'));
$form_class = $module->getForm();
$this->view->form = (new $form_class())->populate(array_merge(
$module->getDefaultValues(),
$this->_request->getPost()));
}
}
?>
\ No newline at end of file
...@@ -57,4 +57,330 @@ class Admin_FileManagerController extends ZendAfi_Controller_Action { ...@@ -57,4 +57,330 @@ class Admin_FileManagerController extends ZendAfi_Controller_Action {
$this->view->titre = $this->_('Explorateur de fichiers : "%s"', $settings->getFocusedPath()); $this->view->titre = $this->_('Explorateur de fichiers : "%s"', $settings->getFocusedPath());
} }
public function dropAction() {
if(!$item = $this->_findItemFromParams())
return ;
if(!$into = $this->_findIntoFromParams($item))
return;
if($item->getPath() == $into->getPath())
return $this->_nothingToDo($item, $into);
$this->view->titre = $this->_('"%s" vers "%s"', $item->getPath(), $into->getPath());
$this->view->disable_move = $item->getParentPath() == $into->getPath() || (!$item->isWritable());
}
public function moveAction() {
if(!$item = $this->_findItemFromParams())
return;
if(!$into = $this->_findIntoFromParams($item))
return;
if($item->getParentPath() == $into->getPath())
return $this->_nothingToDo($item, $into);
if($item->getPath() == $into->getPath())
return $this->_nothingToDo($item, $into);
$expected_destination = $into->getPath() . '/' . $item->getName();
$message = ($success = Class_FileManager::moveItemInto($item, $expected_destination))
? $this->_('Déplacement de "%s" dans "%s" effectué.', $item->getName(), $into->getPath())
: $this->_('Impossible de déplacer "%s" dans "%s".', $item->getName(), $into->getPath());
if($success)
$item->renameModels($expected_destination);
$this->_redirectWithMessage($message);
}
public function copyAction() {
if(Class_FileManager::isFull())
return $this->_spaceFullError();
if(!$item = $this->_findItemFromParams())
return;
if(!$into = $this->_findIntoFromParams($item))
return;
$message = Class_FileManager::copyItemInto($item, $into)
? $this->_('Copie de "%s" dans "%s" effectué.', $item->getName(), $into->getPath())
: $this->_('Impossible de copier "%s" dans "%s".', $item->getName(), $into->getPath());
$this->_redirectWithMessage($message);
}
public function deleteAction() {
$this->view->item = $item = $this->_findItemFromParams();
if(!$item->isDeepWritable())
return $this->_redirectWithMessage($this->_('Le dossier "%s" ne peut pas être supprimé car il contient des éléments protégés en écriture ou utilisés dans les articles, les domaines ou les profils.', $item->getPath()));
$this->view->titre = $this->_('Supprimer "%s"', $item->getPath());
$this->view->models = $item->getModels();
}
public function forceDeleteAction() {
if(!$item = $this->_findItemFromParams())
return;
$success = Class_FileManager::delete($item);
$message = $success
? $this->_('"%s" supprimé.', $item->getPath())
: $this->_('Impossible de supprimer "%s".', $item->getPath());
$path = $success
? $item->getParentPath()
: $item->getPath();
$this->_redirectToPathWithMessage($path, $message);
}
public function createAction() {
$into = $this->_findIntoFromParams();
$this->view->titre = $this->_('Créer un nouveau dossier dans "%s"', $into->getPath());
$this->view->form = $form = ZendAfi_Form_Admin_FileManager_Folder::newWith($this->_request->getParams());
$form->setAction($this->view->url());
if (!$this->_request->isPost())
return;
if (!$form->isValid($this->_getPost()))
return;
$post = $this->_getPost();
$folder = isset($post['folder'])
? $post['folder']
: $this->_getParam('folder');
$message = Class_FileManager::create($folder, $into)
? $this->_('Dossier "%s" créé.', $folder)
: $this->_('Impossible de créer le dossier "%s".', $folder);
$this->_redirectToPathWithMessage($into->getPath() . '/' . $folder, $message);
}
public function importAction() {
if(Class_FileManager::isFull())
return $this->_spaceFullError();
$into = $this->_findIntoFromParams();
$this->view->titre = $this->_('Téléverser un fichier dans "%s"', $into->getPath());
$this->view->form = $form = ZendAfi_Form_Admin_FileManager_Import::newWith(['into' => $into->getRealpath()]);
$this->view->dimensions = array_filter(explode(';', Class_AdminVar::get('RESIZABLE_DIMENSIONS')));
sort($this->view->dimensions, SORT_NUMERIC);
$form->setAction($this->view->url());
if (!$this->_request->isPost())
return;
if($resized_file = $this->_getParam('ajax_resized_image'))
return $this->_ajaxUploadImage($resized_file, $into);
if (!$form->isValid($this->_request->getPost()))
return;
if(!$form->file->receive())
return;
$path = explode('/', $form->file->getFileName());
$filename = array_pop($path);
if(!$file = Class_FileManager::find($into->getId() . '/' . $filename))
return $this->_redirectWithMessage($this->_('Impossible de téléverser le fichier "%s".', $filename));
$message = $this->_('Fichier "%s" téléversé.', $file->getPath());
$this->_redirectToPathWithMessage($file->getPath(), $message);
}
protected function _ajaxUploadImage($resized_file, $into) {
$resized_file = str_replace('data:image/png;base64,', '', $resized_file);
$resized_file = str_replace(' ', '+', $resized_file);
$path = $into->getPath() . '/' . $this->_getParam('filename');
$message = Class_FileManager::createImage($path, base64_decode($resized_file))
? $this->_('Fichier "%s" téléversé.', $path)
: $this->_('Une erreur c\' produite. Le téléversage a échoué.');
$this->_helper->notify($message);
$this->_helper->json(['redirect' => $this->_getUrlWithNewPath($path)]);
}
public function resizeAction() {
$item = $this->_findItemFromParams();
if(!$item->isResizable())
return $this->_redirectWithMessage($this->_('"%s" n\'est pas redimensionnable.', $item->getName()));
$this->view->titre = $this->_('Redimensionner l\'image "%s"', $item->getName());
$this->view->item = $item;
$this->view->dimensions = array_filter(explode(';', Class_AdminVar::get('RESIZABLE_DIMENSIONS')));
sort($this->view->dimensions, SORT_NUMERIC);
}
public function resizeImageAction() {
$item = $this->_findItemFromParams();
$dimensions = $this->_getParam('dimensions');
$available_dimensions = Class_AdminVar::get('RESIZABLE_DIMENSIONS');
if(!in_array($dimensions, explode(';', $available_dimensions)))
return $this->_redirectWithMessage($this->_('Dimensions "%s" invalident. Les dimensions valident sont : %s .', $dimensions, $available_dimensions));
list($width, $height) = explode('x', $dimensions);
$message = (new Class_Notice_Thumbnail_ResizeImage)->resize($item->getRealpath(), $width, $height, null, true)
? $this->_('L\'image "%s" a été redimensionnée.', $item->getId())
: $this->_('Erreur. L\'image "%s" n\'a pas été redimensionnée.', $item->getId());
$this->_redirectWithMessage($message);
}
public function compressImageAction() {
$item = $this->_findItemFromParams();
list($width, $height) = explode('x', $item->getDimensions());
$message = (new Class_Notice_Thumbnail_ResizeImage)->resize($item->getRealpath(), $width, $height, null, true)
? $this->_('L\'image "%s" a été compressée.', $item->getId())
: $this->_('Erreur. L\'image "%s" n\'a pas été compressée.', $item->getId());
$this->_redirectWithMessage($message);
}
public function renameAction() {
$item = $this->_findItemFromParams();
$this->view->titre = $this->_('Renommer "%s"', $item->getBasename());
$this->view->form = $form = ZendAfi_Form_Admin_FileManager_Rename::newWith(['into' => $item->getRealpath(),
'name' => $item->getBasename()]);
$form->setAction($this->view->url());
if (!$this->_request->isPost())
return;
if (!$form->isValid($post = $this->_getPost()))
return;
$new_name= isset($post['name'])
? $post['name']
: $this->_getParam('name');
$new_name = $item->isFile()
? $new_name . '.' . $item->getExtension()
: $new_name;
$expected_destination = $item->getParentPath() . '/' . $new_name;
$message = ($success = Class_FileManager::rename($item, $expected_destination))
? $this->_('"%s" renommé en "%s".', $item->getBasename(), $new_name)
: $this->_('Erreur. Impossible de renommer "%s".', $item->getPath());
if($success)
$item->renameModels($expected_destination);
$this->_redirectWithMessage($message);
}
public function propertiesAction() {
$item = $this->view->item = $this->_findItemFromParams();
$this->view->titre = $this->_('Propriétés de "%s"', $item->getName());
}
protected function _findItemFromParams() {
$item_path = $this->_getParam('item');
if($item = Class_FileManager::find($item_path))
return $item;
return $this->_unknownPathError($item_path);
}
protected function _findIntoFromParams($item = null) {
$into_path = $this->_getParam('into');
if(!$into = Class_FileManager::find($into_path))
return $this->_unknownPathError($into_path);
if(!$into->isDir())
return $this->_forbiddenPathError($into_path);
if($item && $item->contains($into))
return $this->_forbiddenPathError($into_path);
return $into;
}
protected function _unknownPathError($path) {
return $this->_redirectWithMessage($this->_('Erreur. Le chemin "%s" n\'existe pas.', $path));
}
protected function _forbiddenPathError($path) {
return $this->_redirectWithMessage($this->_('Erreur. Impossible de faire cette opération vers "%s".', $path));
}
protected function _nothingToDo($item, $into) {
return $this->_redirectWithMessage($this->_('Vous ne pouvez pas copier ou déplacer un élément avec lui-même : "%s" est identique à "%s" .',
$item->getPath(),
$into->getPath()));
}
protected function _spaceFullError() {
return $this->_redirectWithMessage($this->_('Erreur. Vous ne pouvez pas téléverser un nouveau fichier car vous avez utilisé les "%s méga-octets" disponibles.', Class_AdminVar::get('ALLOWED_DISK_SPACE')));
}
protected function _redirectWithMessage($message) {
$this->_helper->notify($message);
return $this->_redirectClose($this->_getReferer());
}
protected function _redirectToPathWithMessage($path, $message) {
$this->_helper->notify($message);
$url = $this->_getUrlWithNewPath($path);
if (!$this->isPopupRequest())
return $this->_redirect($url);
$this->_popupJavascriptRedirectTo($url);
}
protected function _getUrlWithNewPath($path) {
return $this->view->url(['module' => 'admin',
'controller' => 'file-manager',
'action' => 'index',
$this->_getParam('focused_browser', 'browser') => $path,
'ajax_resized_image' => null,
'render' => null,
'into' => null,
'file' => null,
'item' => null,
'filename' => null,
]);
}
} }
...@@ -24,7 +24,7 @@ class Admin_IndexController extends ZendAfi_Controller_Action { ...@@ -24,7 +24,7 @@ class Admin_IndexController extends ZendAfi_Controller_Action {
. $this->view->tag('span', . $this->view->tag('span',
$this->_(' version %s', $this->_(' version %s',
$this->view->tag('a', BOKEH_RELEASE_NUMBER, $this->view->tag('a', BOKEH_RELEASE_NUMBER,
['href' => BOKEH_REMOTE_FILES . 'blob/' . BOKEH_VERSION . '/VERSIONS'])), ['href' => BOKEH_REMOTE_FILES . 'blob/master/VERSIONS'])),
['class' => 'version']); ['class' => 'version']);
$this->view->user = Class_Users::getIdentity(); $this->view->user = Class_Users::getIdentity();
......
...@@ -202,16 +202,6 @@ class Admin_WidgetController extends ZendAfi_Controller_Action { ...@@ -202,16 +202,6 @@ class Admin_WidgetController extends ZendAfi_Controller_Action {
} }
public function getFormAction() {
$module = Class_Systeme_ModulesAccueil::moduleByCode($this->_getParam('code'));
$form_class = $module->getForm();
$this->view->form = (new $form_class())->populate(array_merge(
$module->getDefaultValues(),
$this->_request->getPost()));
}
protected function _readTemplates() { protected function _readTemplates() {
$templates = file_get_contents(ROOT_PATH . 'public/opac/js/widget_templates/widget_templates.json'); $templates = file_get_contents(ROOT_PATH . 'public/opac/js/widget_templates/widget_templates.json');
return json_decode($templates, true); return json_decode($templates, true);
......
<?php <?php
echo $this->ajaxRedirect(); echo $this->ajaxRedirect($this->url);
?> ?>
<p><?php <p><?php
echo $this->_("Bokeh s'interface avec un certain nombre de ressources numériques. Les ressources numérisées sont cataloguées dans le portail et indexées dans l’OPAC comme les notices du SIGB. Ce qui constitue la force et le caractère unique de Bokeh, est sa capacité à proposer une recherche fusionnée par un métamoteur qui interroge simultanément tous les fonds et tous les contenus."); echo $this->_("Bokeh s'interface avec un certain nombre de ressources numériques. Les ressources numérisées sont cataloguées dans le portail et indexées dans l’OPAC comme les notices du SIGB. Ce qui constitue la force et le caractère unique de Bokeh, est sa capacité à proposer une recherche fusionnée par un métamoteur qui interroge simultanément tous les fonds et tous les contenus.");
?></p> ?></p>
<p><?php <p><?php
echo $this->_("Si vous souhaitez ajouter une ressource à votre portail, il vous faut contractualiser avec le fournisseur de la ressource et demander un devis pour le connecteur à <a href='mailto:cial-bib@afi-sa.fr'>votre commercial</a>."); echo $this->_("Si vous souhaitez ajouter une ressource à votre portail, il vous faut contractualiser avec le fournisseur de la ressource et demander un devis pour le connecteur à <a href='mailto:cial-bib@afi-sa.fr'>votre commercial</a>.");
?></p> ?></p>
<?php <?php
$datas = (new Class_WebService_BibNumerique_Connectors())->getDescription(); $datas = (new Class_WebService_BibNumerique_Connectors())->getDescription();
$datas = json_decode(json_encode($datas)); $datas = json_decode(json_encode($datas));
...@@ -13,15 +13,15 @@ $datas = json_decode(json_encode($datas)); ...@@ -13,15 +13,15 @@ $datas = json_decode(json_encode($datas));
<?php <?php
foreach($datas as $code => $connector) { foreach($datas as $code => $connector) {
$thumb = $connector->image_url $thumb = $connector->image_url
? $this->tag('img', null, ['src' => $connector->image_url, ? $this->tag('img', null, ['src' => $connector->image_url,
'alt' => $connector->label, 'alt' => $connector->label,
'style' => 'width:200px;']) 'style' => 'width:200px;'])
: $connector->label; : $connector->label;
$thumb = $connector->url $thumb = $connector->url
? $this->tag('a', $thumb, ['href' => $connector->url, ? $this->tag('a', $thumb, ['href' => $connector->url,
'target' => '_blank']) 'target' => '_blank'])
: $thumb; : $thumb;
$key_exists = function($key) use ($connector) { $key_exists = function($key) use ($connector) {
return in_array($key, $connector->features); return in_array($key, $connector->features);
...@@ -44,22 +44,37 @@ $datas = json_decode(json_encode($datas)); ...@@ -44,22 +44,37 @@ $datas = json_decode(json_encode($datas));
['href' => $connector->sales_contact->url, ['href' => $connector->sales_contact->url,
'target' => '_blank']); 'target' => '_blank']);
?> ?>
<tr data-code="<?php echo strtolower($connector->code) ?>" > <tr data-code="<?php echo strtolower($connector->code) ?>" >
<td><?php echo $thumb; ?></td> <td><?php echo $thumb; ?></td>
<td><?php echo $connector->desc; ?> <td><?php echo $connector->desc; ?>
<?php if ($features) { ?> <?php if ($features) { ?>
<br/><br/> <br/><br/>
<?php echo $this->tag('strong', $this->_('Fonctionnalités : ')) . implode(', ', $features);?> <?php echo $this->tag('strong', $this->_('Fonctionnalités : ')) . implode(', ', $features);?>
<?php } ?> <?php } ?>
<?php if ($contact) { ?> <?php if ($contact) { ?>
<br/><br/> <br/><br/>
<?php echo $this->tag('strong', $this->_('Contact : ')) . implode(', ', $contact);}?> <?php echo $this->tag('strong', $this->_('Contact : ')) . implode(', ', $contact);}?>
<br/><br/> <br/><br/>
<?php if ($connector->enabled) { <?php
echo $this->tag('div', $this->_('Activé'), ['class' => 'enabled']);?> $label = $this->_('Désactivé');
<?php } ?> $class = 'digital_connectors_status';
</td> if ($connector->enabled) {
</tr> $label = $this->_('Activé');
<?php } ?> $class .= ' enabled';
}
echo $this->button((new Class_Entity)
->setText($label)
->setAttribs(['disabled' => 'disabled',
'onclick' => 'return;',
'class' => $class]));
if(isset($connector->dashboard_url))
echo $this->button((new Class_Entity)
->setUrl($connector->dashboard_url)
->setText($this->_('Tableau de bord')));
?>
</td>
</tr>
<?php } ?>
</tbody> </tbody>
</table> </table>
<?php
echo $this->DigitalResource_Dashboard($this->config);
...@@ -10,12 +10,12 @@ $buttons = [$this->Button_Submit((new Class_Entity) ...@@ -10,12 +10,12 @@ $buttons = [$this->Button_Submit((new Class_Entity)
echo $this->renderForm($this->form, $buttons); echo $this->renderForm($this->form, $buttons);
foreach($this->dimensions as $dimension) foreach($this->dimensions as $dimension)
echo $this->Button_Submit((new Class_Entity) echo $this->button((new Class_Entity)
->setText($dimension) ->setText($dimension)
->setAttribs(['style' => 'display: none;', ->setAttribs(['style' => 'display: none;',
'class' => 'resize_image', 'class' => 'resize_image',
'onclick' => sprintf("$(this).resizeAndUpload('%s');", $dimension), 'onclick' => sprintf("$(this).resizeAndUpload('%s');", $dimension),
'title' => $this->_('Redimensionner en %s pixels puis téléverser', $dimension)])); 'title' => $this->_('Redimensionner en %s pixels puis téléverser', $dimension)]));
echo $this->tag('p', $this->_('Dimensions actuelles de l\'image en pixels: %s', echo $this->tag('p', $this->_('Dimensions actuelles de l\'image en pixels: %s',
$this->tag('span', null)), $this->tag('span', null)),
...@@ -25,4 +25,4 @@ echo $this->tag('img', '', ['id' => 'image_preview']); ...@@ -25,4 +25,4 @@ echo $this->tag('img', '', ['id' => 'image_preview']);
echo $this->tag('i', echo $this->tag('i',
$this->_('Une erreur c\'est produite. Le téléversement ne sera pas effectué.'), $this->_('Une erreur c\'est produite. Le téléversement ne sera pas effectué.'),
['style' => 'display: none;', ['style' => 'display: none;',
'id' => 'import_file_error']); 'id' => 'import_file_error']);
\ No newline at end of file
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
class Api_UserController extends ZendAfi_Controller_Action { class Api_UserController extends ZendAfi_Controller_Action {
public function loansAction() { public function loansAction() {
if (!$this->_request->isSecure()) if (Class_AdminVar_OAuthAcceptHTTP::shouldRejectRequest($this->_request))
return $this->_error($this->_('Protocole HTTP obligatoire')); return $this->_error($this->_('Protocole HTTPS obligatoire'));
if (!$authorization = $this->_request->getHeader('authorization')) if (!$authorization = $this->_request->getHeader('authorization'))
return $this->_error($this->_('Autorisation non spécifiée')); return $this->_error($this->_('Autorisation non spécifiée'));
......
...@@ -798,10 +798,8 @@ class Auth_Strategy_Cas_Abstract extends Auth_Strategy_Abstract{ ...@@ -798,10 +798,8 @@ class Auth_Strategy_Cas_Abstract extends Auth_Strategy_Abstract{
public function redirectMusicme() { public function redirectMusicme() {
if (strpos($this->controller->getCasServerUrl(),'musicme') !== false) { if (strpos($this->controller->getCasServerUrl(),'musicme') !== false)
$module_menu = Class_DigitalResource::getInstance()->getModuleMenuFor('Musicme'); return Musicme_Config::getInstance()->getSsoUrl(Class_Users::getIdentity());
return $module_menu->getDynamiqueUrl();
}
return false; return false;
} }
......
...@@ -76,20 +76,21 @@ class ModulesController extends ZendAfi_Controller_Action { ...@@ -76,20 +76,21 @@ class ModulesController extends ZendAfi_Controller_Action {
public function ssoAction() { public function ssoAction() {
if (!$record = Class_Notice::find($this->_getParam('id', 0))) { if (!$record = Class_Notice::find($this->_getParam('id', 0))) {
$this->_helper->notify($this->_('Document non trouvé')); $this->_helper->notify($this->_('L\'identifiant du document demandé n\'existe pas'));
$this->_redirectToReferer(); $this->_redirectToReferer();
return; return;
} }
$sso_record = new Class_Notice_Sso($record); $sso_record = new Class_Notice_Sso($record);
if(!$module_menu = $sso_record->getModuleMenu()) { if(!$digital_resource_config = $sso_record->getConfig()) {
$this->_helper->notify($this->_('Oups, l\'adresse de consultation de ce document est indeterminée')); $this->_helper->notify($this->_('Ce document ne possède pas de configuration permettant d\'utiliser cette URL.'));
$this->_redirectToReferer(); return $this->_redirectToReferer();
return;
} }
$module_menu->setRecord($sso_record); $this->_forward('sso',
$this->simple($module_menu); 'index',
$digital_resource_config->getModuleName(),
$this->_request->getParams());
} }
......
<?php <?php
Class_ScriptLoader::getInstance()->addSkinStyleSheet('iframe');
ob_start(); ob_start();
echo $this->render($this->actionScript); echo $this->render($this->actionScript);
$html_contents = ob_get_contents(); $html_contents = ob_get_contents();
......
- ticket #72470 : Boîtes kiosque : Réactivation du chargement des personnalisations css des iframes
\ No newline at end of file
...@@ -286,6 +286,7 @@ class Class_AdminVarLoader extends Storm_Model_Loader { ...@@ -286,6 +286,7 @@ class Class_AdminVarLoader extends Storm_Model_Loader {
protected function _getGlobalVars() { protected function _getGlobalVars() {
return [ return [
'FORCE_HTTPS' => Class_AdminVar_Meta::newOnOff($this->_('Forcer l\'accès au site par le protocole HTTPS. Nécessite l\'installation et la configuration appropriée du serveur Web')), 'FORCE_HTTPS' => Class_AdminVar_Meta::newOnOff($this->_('Forcer l\'accès au site par le protocole HTTPS. Nécessite l\'installation et la configuration appropriée du serveur Web')),
'OAUTH_ACCEPT_HTTP' => Class_AdminVar_Meta::newOnOff($this->_('Autoriser l\'accès aux API OAUTH via HTTP (non sécurisé - déconseillé)'), ['value' => 0]),
'NB_AFFICH_AVIS_PAR_AUTEUR' => Class_AdminVar_Meta::newDefault($this->_('Nombre d\'avis maximum à afficher par utilisateur.')), 'NB_AFFICH_AVIS_PAR_AUTEUR' => Class_AdminVar_Meta::newDefault($this->_('Nombre d\'avis maximum à afficher par utilisateur.')),
'CLEF_GOOGLE_MAP' => Class_AdminVar_Meta::newDefault($this->_('Clef d\'activation pour le plan d\'accès google map. <a target="_blank" href="http://code.google.com/apis/maps/signup.html">Obtenir la clé google map</a>')), 'CLEF_GOOGLE_MAP' => Class_AdminVar_Meta::newDefault($this->_('Clef d\'activation pour le plan d\'accès google map. <a target="_blank" href="http://code.google.com/apis/maps/signup.html">Obtenir la clé google map</a>')),
'REGISTER_OK' => Class_AdminVar_Meta::newEncodedData($this->_('Texte visible par l\'internaute après son inscription.')), 'REGISTER_OK' => Class_AdminVar_Meta::newEncodedData($this->_('Texte visible par l\'internaute après son inscription.')),
...@@ -327,7 +328,7 @@ class Class_AdminVarLoader extends Storm_Model_Loader { ...@@ -327,7 +328,7 @@ class Class_AdminVarLoader extends Storm_Model_Loader {
'FACETTE_INTERET_LIBELLE' => Class_AdminVar_Meta::newDefault('Libellé de la facette centres d\'intérêt'), 'FACETTE_INTERET_LIBELLE' => Class_AdminVar_Meta::newDefault('Libellé de la facette centres d\'intérêt'),
'FACETTE_MATIERE_LIBELLE' => Class_AdminVar_Meta::newDefault('Libellé de la facette matière'), 'FACETTE_MATIERE_LIBELLE' => Class_AdminVar_Meta::newDefault('Libellé de la facette matière'),
'FACETTE_TAG_LIBELLE' => Class_AdminVar_Meta::newDefault('Libellé de la facette tag'), 'FACETTE_TAG_LIBELLE' => Class_AdminVar_Meta::newDefault('Libellé de la facette tag'),
'UNLEASHED_FACETS' => Class_AdminVar_Meta::newMultiInput($this->_('Liste des codes des facettes qui ne sont pas limitées à l\'affichage dans le résultat de recherche<br/>Exemple : T => Type de doc, Y => Annexe, B => Bibliothèque, ... (Voir <a href="' . BOKEH_REMOTE_FILES . 'blob/' . BOKEH_VERSION . '/library/Class/Codification.php#L24">la liste complète</a>)')), 'UNLEASHED_FACETS' => Class_AdminVar_Meta::newMultiInput($this->_('Liste des codes des facettes qui ne sont pas limitées à l\'affichage dans le résultat de recherche<br/>Exemple : T => Type de doc, Y => Annexe, B => Bibliothèque, ... (Voir <a href="' . BOKEH_REMOTE_FILES . 'blob/master/library/Class/Codification.php#L24">la liste complète</a>)')),
'BOITE_PANIER_AUTO' => Class_AdminVar_Meta::newOnOff($this->_('Ajouter automatiquement une boîte panier dans la division flottante')), 'BOITE_PANIER_AUTO' => Class_AdminVar_Meta::newOnOff($this->_('Ajouter automatiquement une boîte panier dans la division flottante')),
'EXTRA_SKIN_PATH' => Class_AdminVar_Meta::newDefault($this->_('Chemin vers les skins personnalisées, relatif à %s', Class_Profil_Skin::EXTRA_PATH)), 'EXTRA_SKIN_PATH' => Class_AdminVar_Meta::newDefault($this->_('Chemin vers les skins personnalisées, relatif à %s', Class_Profil_Skin::EXTRA_PATH)),
'ENABLE_COLLABORATIVE_BROWSING' => Class_AdminVar_Meta::newOnOff($this->_('Activation de la navigation collaborative')), 'ENABLE_COLLABORATIVE_BROWSING' => Class_AdminVar_Meta::newOnOff($this->_('Activation de la navigation collaborative')),
......
<?php
/**
* Copyright (c) 2012-2017, Agence Française Informatique (AFI). All rights reserved.
*
* BOKEH is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* BOKEH is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* 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
*/
class Class_AdminVar_OAuthAcceptHTTP {
public static function isEnabled( ) {
return '1' == Class_AdminVar::getValueOrDefault('OAUTH_ACCEPT_HTTP');
}
public static function shouldRejectRequest($request) {
return !($request->isSecure() || static::isEnabled());
}
}
?>
\ No newline at end of file