put ldt platform url in config
authorYves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
Wed, 20 May 2015 19:37:20 +0200
changeset 1244 87583b020202
parent 1243 c6fd99a5abe4
child 1245 83a59592b274
put ldt platform url in config
web/common.php
web/config.php.tmpl
web/polemicaltimeline.php
--- a/web/common.php	Wed May 20 19:09:05 2015 +0200
+++ b/web/common.php	Wed May 20 19:37:20 2015 +0200
@@ -15,7 +15,6 @@
 */
 date_default_timezone_set('UTC');
 
-$ldt_platform = 'http://ldt.iri.centrepompidou.fr/';
 $project_url_base = 'ldtplatform/ldt/cljson/id/';
 
 $C_default_rep = 'museo-1415-07-traduction';
@@ -403,11 +402,11 @@
 }
 
 function get_metadata_url($metadata) {
-    global $ldt_platform, $project_url_base;
+    global $project_url_base;
     if (preg_match('/^https?:\/\//', $metadata)) {
         return $metadata;
     } else {
-        return $ldt_platform.$project_url_base.$metadata;
+        return LDT_PLATFORM.$project_url_base.$metadata;
     }
 }
 
--- a/web/config.php.tmpl	Wed May 20 19:09:05 2015 +0200
+++ b/web/config.php.tmpl	Wed May 20 19:37:20 2015 +0200
@@ -7,6 +7,7 @@
 
 //define('URL_ROOT', 'http://127.0.0.1/IRI/REPO_TWEET_LIVE/web/');
 define('URL_ROOT', 'http://127.0.0.1/IRI/REPO_TWEET_LIVE/web/');
+define('LDT_PLATFORM' , 'http://ldt.iri.centrepompidou.fr/');
 define('SECRET', '^e)3u&jwy@#156no9lmc1s&$g-x0n@lb=(+xgovk#5^kb)qvkb');
 
 $C_default_registry = 'cdn';
--- a/web/polemicaltimeline.php	Wed May 20 19:09:05 2015 +0200
+++ b/web/polemicaltimeline.php	Wed May 20 19:37:20 2015 +0200
@@ -168,13 +168,13 @@
             },
             {
                 type: "AnnotationsList",
-                //ajax_url : "http://ldt.iri.centrepompidou.fr/ldtplatform/api/ldt/segments/{{media}}/{{begin}}/{{end}}?callback=?",
-                //foreign_url : "http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/front/player/{{media}}/{{project}}/{{annotationType}}#id={{annotation}}",
+                //ajax_url : "<?php echo(LDT_PLATFORM); ?>ldtplatform/api/ldt/segments/{{media}}/{{begin}}/{{end}}?callback=?",
+                //foreign_url : "<?php echo(LDT_PLATFORM); ?>ldtplatform/ldt/front/player/{{media}}/{{project}}/{{annotationType}}#id={{annotation}}",
                 container: "AnnotationsListContainer"
             },
             {
                 type: "CreateAnnotation",
-                api_endpoint_template: "http://ldt.iri.centrepompidou.fr/ldtplatform/api/ldt/1.0/annotations/",
+                api_endpoint_template: "<?php echo(LDT_PLATFORM); ?>ldtplatform/api/ldt/1.0/annotations/",
                 api_method: 'POST',
                 after_send_timeout: 8000,
                 show_mic_record: false,