Skip to content
Snippets Groups Projects
Commit 646c4771 authored by Giovannoni Laurent's avatar Giovannoni Laurent
Browse files

add: licence texts

parent 3f8192f4
No related branches found
No related tags found
No related merge requests found
...@@ -8,22 +8,22 @@ class Merge ...@@ -8,22 +8,22 @@ class Merge
//merge the js //merge the js
$this->mergeJs(); $this->mergeJs();
} }
private function mergeCss() private function mergeCss()
{ {
if ($this->needToMergeCss()) { if ($this->needToMergeCss()) {
$dirStyle = 'css/'; $dirStyle = 'css/';
$styleDirectory = opendir($dirStyle); $styleDirectory = opendir($dirStyle);
$mergedCss = '@charset "UTF-8";'."\n\n"; $mergedCss = '@charset "UTF-8";'."\n\n";
//atProperty first //atProperty first
$cssLines = file(realpath($dirStyle.'atProperty.css')); $cssLines = file(realpath($dirStyle.'atProperty.css'));
$mergedCss .= '/* atProperty.css */'."\n"; $mergedCss .= '/* atProperty.css */'."\n";
for ($i=0; $i<count($cssLines); $i++) { for ($i=0; $i<count($cssLines); $i++) {
$mergedCss .= $cssLines[$i]; $mergedCss .= $cssLines[$i];
} }
$mergedCss .= "\n\n"; $mergedCss .= "\n\n";
while($styleFile = @readdir($styleDirectory)) { while($styleFile = @readdir($styleDirectory)) {
if ( substr($styleFile, 0, 1) != '.' if ( substr($styleFile, 0, 1) != '.'
&& substr($styleFile, -4) == '.css' && substr($styleFile, -4) == '.css'
...@@ -39,23 +39,23 @@ class Merge ...@@ -39,23 +39,23 @@ class Merge
} }
} }
closedir($styleDirectory); closedir($styleDirectory);
/* /*
$interdit = array( $interdit = array(
"\n", "\n",
"\r", "\r",
"\t" "\t"
); );
$autorise = array('', $autorise = array('',
'', '',
'' ''
); );
$mergedCss = str_replace( $mergedCss = str_replace(
$interdit, $interdit,
$autorise, $autorise,
$mergedCss $mergedCss
); );
*/ */
if (file_exists($dirStyle.'merged_css.css')) { if (file_exists($dirStyle.'merged_css.css')) {
unlink($dirStyle.'merged_css.css'); unlink($dirStyle.'merged_css.css');
} }
...@@ -64,15 +64,15 @@ class Merge ...@@ -64,15 +64,15 @@ class Merge
fclose ($merged_style); fclose ($merged_style);
} }
} }
private function mergeJs() private function mergeJs()
{ {
if ($this->needToMergeJs()) { if ($this->needToMergeJs()) {
$dirJavascript = 'js/'; $dirJavascript = 'js/';
$javascriptDirectory = opendir($dirJavascript); $javascriptDirectory = opendir($dirJavascript);
$mergedJavascript = '// JavaScript Document'."\n\n"; $mergedJavascript = '// JavaScript Document'."\n\n";
//jquery first //jquery first
$javascriptLines = file(realpath($dirJavascript.'0_jQuery.js')); $javascriptLines = file(realpath($dirJavascript.'0_jQuery.js'));
$mergedJavascript .= '/* 0_jQuery.js */'."\n"; $mergedJavascript .= '/* 0_jQuery.js */'."\n";
...@@ -104,7 +104,7 @@ class Merge ...@@ -104,7 +104,7 @@ class Merge
fclose ($merged_javascript); fclose ($merged_javascript);
} }
} }
private function needToMergeCss() private function needToMergeCss()
{ {
$write = false; $write = false;
...@@ -129,7 +129,7 @@ class Merge ...@@ -129,7 +129,7 @@ class Merge
return $write; return $write;
} }
private function needToMergeJs() private function needToMergeJs()
{ {
$write = false; $write = false;
......
...@@ -5,5 +5,17 @@ ...@@ -5,5 +5,17 @@
$shortTitle = _LICENCE; $shortTitle = _LICENCE;
$longTitle = _LICENCE; $longTitle = _LICENCE;
//LICENCE FILE
$pathToLicenceTxt = 'view/text/licence_'.$Class_Install->getActualLang().'.txt';
if (!file_exists($pathToLicenceTxt)) {
$pathToLicenceTxt = 'view/text/licence_en.txt';
}
$fileLicence = file($pathToLicenceTxt);
$txtLicence = '';
for ($i=0;$i<count($fileLicence);$i++) {
$txtLicence .= str_replace(array('<', '>'), array('&lt;', '&gt;'),$fileLicence[$i]).'<br />';
}
//VIEW //VIEW
$view = 'licence'; $view = 'licence';
...@@ -8,21 +8,9 @@ ...@@ -8,21 +8,9 @@
<div class="contentBlock" id="licence"> <div class="contentBlock" id="licence">
<p> <p>
<div align="center"> <div align="center">
ICI LA LICENCE GPL V3<br /> <div>
ICI LA LICENCE GPL V3<br /> <?php echo $txtLicence; ?>
ICI LA LICENCE GPL V3<br /> </div>
ICI LA LICENCE GPL V3<br />
ICI LA LICENCE GPL V3<br />
ICI LA LICENCE GPL V3<br />
ICI LA LICENCE GPL V3<br />
ICI LA LICENCE GPL V3<br />
ICI LA LICENCE GPL V3<br />
ICI LA LICENCE GPL V3<br />
ICI LA LICENCE GPL V3<br />
ICI LA LICENCE GPL V3<br />
ICI LA LICENCE GPL V3<br />
ICI LA LICENCE GPL V3<br />
ICI LA LICENCE GPL V3<br />
<br /> <br />
<input type="checkbox" id="checkboxLicence" onChange="checkLicence();"/> <input type="checkbox" id="checkboxLicence" onChange="checkLicence();"/>
<label for="checkboxLicence"> <label for="checkboxLicence">
......
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment