From: vincent@cubedesigners.com Date: Fri, 4 Feb 2011 17:11:18 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=6b98b110c06bf7dfc901f3d920a30596087c72ba;p=cubeextranet.git --- diff --git a/.htaccess b/.htaccess index 7deb29f2a..16e1440da 100644 --- a/.htaccess +++ b/.htaccess @@ -34,4 +34,8 @@ RewriteRule ^viewer/([0-9]+)_([0-9a-fA-F]+)_([0-9]+)/(.+)$ fluidbook/books/final RewriteRule ^vieweru/([0-9]+)_([0-9a-fA-F]+)_([0-9]+)/index.html$ vieweru/$1_$2_$3/index [L] RewriteRule ^vieweru/([0-9]+)_([0-9a-fA-F]+)_([0-9]+)/index.swf$ fluidbook/compile/_unprotected/index.swf [L] RewriteRule ^vieweru/([0-9]+)_([0-9a-fA-F]+)_([0-9]+)/player.swf$ fluidbook/compile/_unprotected/player.swf [L] -RewriteRule ^vieweru/([0-9]+)_([0-9a-fA-F]+)_([0-9]+)/(.+)$ fluidbook/books/final/$1/$4 [L] \ No newline at end of file +RewriteRule ^vieweru/([0-9]+)_([0-9a-fA-F]+)_([0-9]+)/(.+)$ fluidbook/books/final/$1/$4 [L] + +RewriteRule ^viewerp/([0-9]+)_([0-9a-fA-F]+)_([0-9]+)/index.html$ viewerp/$1_$2_$3/index [L] +RewriteRule ^viewerp/([0-9]+)_([0-9a-fA-F]+)_([0-9]+)/index.swf$ fluidbook/compile/_unprotected/player.swf [L] +RewriteRule ^viewerp/([0-9]+)_([0-9a-fA-F]+)_([0-9]+)/(.+)$ fluidbook/books/final/$1/$4 [L] \ No newline at end of file diff --git a/inc/ws/Controlleur/class.ws.url.php b/inc/ws/Controlleur/class.ws.url.php index d12eeb57f..e6b1418aa 100644 --- a/inc/ws/Controlleur/class.ws.url.php +++ b/inc/ws/Controlleur/class.ws.url.php @@ -255,6 +255,26 @@ html{height:100%}' . "\n"; return wsStats::display($bid, $annee, $mois); } + public static function viewerp($args) + { + commonDroits::min(5); + + $args = cubePage::getArgs($args); + + $e = explode('_', $args[0]); + if (count($e) == 2 || $e[2] < TIME-10) { + $e[2] = TIME; + http::redirect(SITE_PATH . 'viewerp/' . implode('_', $e) . '/'); + exit; + } + + $book_id = $e[0]; + + self::checkDocumentVersionOfBook($book_id); + + echo self::commonViewer($book_id, $e[1]); + } + public static function vieweru($args) { commonDroits::min(5); @@ -272,7 +292,7 @@ html{height:100%}' . "\n"; self::checkDocumentVersionOfBook($book_id); - echo self::commonViewer($book_id,$e[1]); + echo self::commonViewer($book_id, $e[1]); } public static function viewer($args) @@ -291,10 +311,10 @@ html{height:100%}' . "\n"; self::checkDocumentVersionOfBook($book_id); wsSecureSWF::checkProtectedSWF(); - echo self::commonViewer($book_id,$e[1]); + echo self::commonViewer($book_id, $e[1]); } - public static function commonViewer($book_id,$hash) + public static function commonViewer($book_id, $hash) { if (!defined('MINIMIZE_JS')) { define('MINIMIZE_JS', false); diff --git a/inc/ws/_common.php b/inc/ws/_common.php index 391841f95..da8679da7 100644 --- a/inc/ws/_common.php +++ b/inc/ws/_common.php @@ -11,6 +11,7 @@ $core->url->register('services', 'services', '^services(.*)$', array('wsServices $core->url->register('editor', 'editor', '^editor/(.*)$', array('wsUrl', 'editor')); $core->url->register('viewer', 'viewer', '^viewer/(.*)$', array('wsUrl', 'viewer')); $core->url->register('vieweru', 'vieweru', '^vieweru/(.*)$', array('wsUrl', 'vieweru')); +$core->url->register('viewerp', 'viewerp', '^viewerp/(.*)$', array('wsUrl', 'viewerp')); if (DEV) { $tools = ROOT . '/../inc/tools/';