Skip to content
Permalink
Browse files

Merge branch 'dev'

  • Loading branch information...
JB Lebrun
JB Lebrun committed Nov 5, 2018
2 parents deba7fd + af74b76 commit 0641f69537223dd9b8a0aee68ad8125ebc1561bb
Showing with 2,781 additions and 2,179 deletions.
  1. +15 −9 Camyks.php.inc
  2. +29 −0 documents/changelogs/Release-20181001.md
  3. +5 −5 engine/etc/static.php.inc
  4. +3 −3 engine/lib/object/CImage.php.inc
  5. +127 −6 engine/lib/object/CPDF.php.inc
  6. +1 −1 engine/lib/object/Database_connection.php.inc
  7. +25 −18 engine/lib/object/FSFile.php.inc
  8. +14 −12 engine/lib/object/HTMLForm.php.inc
  9. +7 −7 engine/lib/object/HTMLPage.php.inc
  10. +8 −3 engine/lib/object/MLDatabaseItem.php.inc
  11. +2 −2 engine/lib/object/ModuleLibraryItem.php.inc
  12. +28 −28 engine/lib/object/MySQLiDBConnection.php.inc
  13. +117 −87 engine/lib/tool/client.php.inc
  14. +35 −5 engine/lib/tool/clientBots/Bots.php.inc
  15. +37 −7 engine/lib/tool/clientBots/Tools.php.inc
  16. +6 −5 engine/lib/tool/clientDevices/Acer.php.inc
  17. +46 −0 engine/lib/tool/clientDevices/Amazon.php.inc
  18. +72 −72 engine/lib/tool/clientDevices/Apple.php.inc
  19. +4 −4 engine/lib/tool/clientDevices/Archos.php.inc
  20. +5 −2 engine/lib/tool/clientDevices/Google.php.inc
  21. +4 −3 engine/lib/tool/clientDevices/HiSense.php.inc
  22. +45 −0 engine/lib/tool/clientDevices/HomTom.php.inc
  23. +13 −3 engine/lib/tool/clientDevices/Huawei.php.inc
  24. +45 −0 engine/lib/tool/clientDevices/Konrow.php.inc
  25. +8 −4 engine/lib/tool/clientDevices/LG.php.inc
  26. +3 −2 engine/lib/tool/clientDevices/Lenovo.php.inc
  27. +4 −3 engine/lib/tool/clientDevices/Meizu.php.inc
  28. +7 −5 engine/lib/tool/clientDevices/Nokia.php.inc
  29. +3 −2 engine/lib/tool/clientDevices/Orange.php.inc
  30. +186 −172 engine/lib/tool/clientDevices/Samsung.php.inc
  31. +9 −2 engine/lib/tool/clientDevices/Sony.php.inc
  32. +46 −0 engine/lib/tool/clientDevices/Tecno.php.inc
  33. +5 −4 engine/lib/tool/clientDevices/Vivo.php.inc
  34. +4 −2 engine/lib/tool/clientDevices/Wiko.php.inc
  35. +4 −2 engine/lib/tool/clientDevices/Xiaomi.php.inc
  36. +31 −8 engine/lib/tool/colors.php.inc
  37. +11 −9 engine/lib/tool/data.php.inc
  38. +5 −7 engine/lib/tool/file.php.inc
  39. +34 −27 engine/lib/tool/language.php.inc
  40. +9 −2 engine/lib/tool/string.php.inc
  41. +3 −3 engine/lib/tool/url.php.inc
  42. +9 −6 engine/skeleton_site/.htaccess
  43. +15 −14 plugin/input/FileManager/FileManager.php.inc
  44. +13 −16 plugin/input/PerpetualCalendar/js/PerpetualCalendar.js
  45. +1,077 −1,071 plugin/input/SiteMonitoringToolbar/js/SiteMonitoringToolbar.js
  46. +3 −2 plugin/module/Admin_ContentPage/Admin_ContentPage.php.inc
  47. +13 −4 plugin/module/Admin_ContentPage/html/configuration/edit.html.inc
  48. +15 −6 plugin/module/Admin_ContentPage/html/configuration/view.html.inc
  49. +29 −6 plugin/module/Admin_ContentPage/lib/Admin_ContentPageConfig.php.inc
  50. +28 −19 plugin/module/Admin_ContentPage/lib/ContentPage.php.inc
  51. +7 −3 plugin/module/Admin_ContentPage/locale/translation_en.php.inc
  52. +9 −5 plugin/module/Admin_ContentPage/locale/translation_fr.php.inc
  53. +114 −114 plugin/module/Admin_GenericGuestBookManager/Admin_GenericGuestBookManager.php.inc
  54. +331 −324 plugin/module/Tool_Installer/Tool_Installer.php.inc
  55. +53 −53 plugin/module/Tool_Installer/lib/Tool_InstallerParams.php.inc
@@ -4,9 +4,9 @@
* @details Engine / Main Object
* @file Camyks.php.inc
* @author CaMykS Team <camyks.contact@gmail.com>
* @version 1.0.4
* @version 1.0.7
* @date Creation: Jun 2005
* @date Modification: Jul 2018
* @date Modification: Oct 2018
* @copyright 2005 - 2018 CaMykS Team
* @note This program is distributed as is - WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -507,7 +507,9 @@ final class Camyks {
require_once ($this->camyks_path.'/engine/etc/static.php.inc');
/* merge engine and site configs */
$this->_conf = array_merge($this->_conf, $this->site_conf);
foreach ($this->site_conf as $name => $value)
if (!isset($this->_conf[$name]) or trim($value) != '')
$this->_conf[$name] = $value;
}
/**
@@ -860,13 +862,17 @@ final class Camyks {
$list = array();
/* load language from header */
if ($type == 'admin') {
$newlg = (isset($_REQUEST['_clg_']) ? $_REQUEST['_clg_'] : '');
} else {
$newlg = (isset($_REQUEST['_clg_']) ? substr($_REQUEST['_clg_'], 1, 3) : '');
$newlg = '';
if (isset($_REQUEST['_clg_'])) {
if ($type == 'admin')
$newlg = $_REQUEST['_clg_'];
elseif (strlen($_REQUEST['_clg_']) == 3)
$newlg = substr($_REQUEST['_clg_'], 1, 3);
else
$newlg = $_REQUEST['_clg_'];
}
if (count($list) == 0 or $newlg == '' or !in_array ($newlg, $list)) {
if (count($list) == 0 or $newlg == '' or !in_array($newlg, $list)) {
if ($this->get_sessionValue($type.'language') != null) {
$l = $this->get_sessionValue($type.'language');
} else if ($type == 'admin' and ($lc = cookie_get('adminlanguage')) != null) {
@@ -885,7 +891,7 @@ final class Camyks {
cookie_save('adminlanguage', $l, 90);
$this->set_sessionValue($type.'language', $l);
$this->current_language = $l;
$loc = setlocale (LC_ALL, language_getLocale($l, $this->get_confValue('encoding')));
$loc = setlocale(LC_ALL, language_getLocale($l, $this->get_confValue('encoding')));
}
/******************** ENCODING **********************/
@@ -0,0 +1,29 @@
# CaMykS Changelog
## Release 20181001

* [2018-09-03 11:31:55 +0200 | JB Lebrun] Adds September 2018 release history in changelogs [#View details](https://github.com/Dj1b/CaMykS/commit/6e841cc13b6b48d553d1eba61902810f2c3c4b39)
* [2018-09-04 17:30:55 +0200 | JB Lebrun] Fixes file selection list display in Admin_SystemLogManager module. [#View details](https://github.com/Dj1b/CaMykS/commit/e2105e4ddb7278da934df142f285f3a4a4d0a108)
* [2018-09-06 17:30:16 +0200 | JB Lebrun] Extends module installation to other plugins in Admin_PluginManager module and Module and Plugin libraries. [#View details](https://github.com/Dj1b/CaMykS/commit/b282aaf1e6c7a22c0b4884e16d15fb1d1cffbefc)
* [2018-09-06 17:57:55 +0200 | JB Lebrun] Updates user agent detection in client library. [#View details](https://github.com/Dj1b/CaMykS/commit/98f61982fd10992d85eb520fa94e173abe58505e)
* [2018-09-06 19:01:07 +0200 | JB Lebrun] Fixes a bug in commit b282aaf1e6c7a22c0b4884e16d15fb1d1cffbefc in Plugin library. [#View details](https://github.com/Dj1b/CaMykS/commit/7e4cfa8777b8e0716497704c74524cb208cff892)
* [2018-09-06 19:03:27 +0200 | JB Lebrun] Adds better support of transparency, and enhances picture opening in CImage library, including a new method in file library. [#View details](https://github.com/Dj1b/CaMykS/commit/d1e29a2b2542ba0340fa10483b4e8aad2a673cf8)
* [2018-09-07 12:59:52 +0200 | JB Lebrun] Inserts GoogleAnalytics input. [#View details](https://github.com/Dj1b/CaMykS/commit/d2f510a0e9f0ac7c5d13d82c2552ef552fabea71)
* [2018-09-07 14:27:53 +0200 | JB Lebrun] Removes Google Analytics parameters from default site configuration and from Tool_Installer configuration layout. [#View details](https://github.com/Dj1b/CaMykS/commit/b34fd0d574ffef7e43a06ea0a5aaed21ed9fd828)
* [2018-09-11 15:33:32 +0200 | JB Lebrun] Updates user agent detection in client library. [#View details](https://github.com/Dj1b/CaMykS/commit/ec4e7cb227dd53616876dc990ad16739b1a3cf45)
* [2018-09-12 10:14:44 +0200 | JB Lebrun] Removes never-finished Admin_CommunityAccountManager module. [#View details](https://github.com/Dj1b/CaMykS/commit/6f7bcedf8ada4b99072ba2a29ad977f174a23cee)
* [2018-09-13 15:52:36 +0200 | JB Lebrun] Normalises files format, indents more nicely the code and makes the Admin_ContentPage module, ready to be parsed by Doxygen. [#View details](https://github.com/Dj1b/CaMykS/commit/c90e6ea1bb5ac020e114e6d9e61f7f9d0e11644f)
* [2018-09-13 17:56:41 +0200 | JB Lebrun] Update user agent detection in client library. [#View details](https://github.com/Dj1b/CaMykS/commit/7d7f059fff17025e561b3a3438f33d814099ef85)
* [2018-09-13 19:02:01 +0200 | JB Lebrun] Fixes a bug in plugin installation check in Plugin library and Admin_PluginManager module. [#View details](https://github.com/Dj1b/CaMykS/commit/8073f6454b9916a3ccdc9bf0f0387d656536139a)
* [2018-09-19 10:26:51 +0200 | JB Lebrun] Adds new methods in url library dedicated to URL auto formatting and display. [#View details](https://github.com/Dj1b/CaMykS/commit/606f6f2e969bd8b378dd63fde48b0cc9b3c209a6)
* [2018-09-19 10:28:55 +0200 | JB Lebrun] Updates user agent detection in client library. [#View details](https://github.com/Dj1b/CaMykS/commit/a43e8d1f3e4604f0a7ac509d0540507013a279c5)
* [2018-09-19 10:30:13 +0200 | JB Lebrun] Allows HTMLForm library to be extended. [#View details](https://github.com/Dj1b/CaMykS/commit/623a5e1fb0857db1f7f35f3b0d573c480b7d0f33)
* [2018-09-19 17:27:28 +0200 | JB Lebrun] Makes htaccess update compatible with old websites. [#View details](https://github.com/Dj1b/CaMykS/commit/f49365e126d6569a8b8f9f46edd8ab4f43dab2a2)
* [2018-09-24 11:59:20 +0200 | JB Lebrun] Updates user agent detection in client library. [#View details](https://github.com/Dj1b/CaMykS/commit/0a585bb9f6ce5e6f8925f91283962a5c0bf8074a)
* [2018-09-26 12:34:22 +0200 | JB Lebrun] Adds display_numberInput method in HTMLForm library. [#View details](https://github.com/Dj1b/CaMykS/commit/67b40f026782641ed81c5d5047deea078e954b61)
* [2018-09-26 12:39:52 +0200 | JB Lebrun] Force rename client-side scripts in several inputs - Part 1 [#View details](https://github.com/Dj1b/CaMykS/commit/bb071b8bc703979d2b7a4f61635fa08e13157e82)
* [2018-09-26 14:04:11 +0200 | JB Lebrun] Force renames client-side scripts in several inputs - Part 2 [#View details](https://github.com/Dj1b/CaMykS/commit/e6bfb3996f83a7291debe92bb8d61d4210b1cfb9)
* [2018-09-28 10:13:02 +0200 | JB Lebrun] Updates user agent detection in client library. [#View details](https://github.com/Dj1b/CaMykS/commit/89e20c96cea5f103653c4dcd7eb108a5193ab8b5)
* [2018-09-28 10:16:04 +0200 | JB Lebrun] Adds support for files path and url with a query string in FSFile and Plugin libraries. [#View details](https://github.com/Dj1b/CaMykS/commit/6d7338a7b4ebe3ecaafa365d7d9c653a9b606fd5)
* [2018-09-28 12:44:54 +0200 | JB Lebrun] Reworks HTMLForm library with numerous new features and enhancements. [#View details](https://github.com/Dj1b/CaMykS/commit/9959fe62ce4337c5194a61a3e77f533afa8e039f)
* [2018-10-01 10:19:43 +0200 | JB Lebrun] Does some files cleaning. [#View details](https://github.com/Dj1b/CaMykS/commit/47daf8d09475739ff1f09d593082b03c2a9dbb3a)
* [2018-10-01 10:24:25 +0200 | JB Lebrun] Prepares release. [#View details](https://github.com/Dj1b/CaMykS/commit/14d463583fc74fd7cdb23839f24ca2b7bac3e0c7)
@@ -5,9 +5,9 @@
* @details Engine / Configuration file
* @file engine/etc/static.php.inc
* @author CaMykS Team <camyks.contact@gmail.com>
* @version 1.0.4
* @version 1.0.5
* @date Creation: Sep 2005
* @date Modification: Oct 2018
* @date Modification: Nov 2018
* @copyright 2005 - 2018 CaMykS Team
* @note This program is distributed as is - WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -23,7 +23,7 @@ $this->website = 'https://www.camyks.net';
* @var string $this->version
* @brief CaMykS full version
*/
$this->version = '1.0-20181001';
$this->version = '1.0-20181101';
/**
* @var string $this->mversion
@@ -35,13 +35,13 @@ $this->mversion = '1.0';
* @var string $this->nversion
* @brief CaMykS minor version
*/
$this->nversion = '20181001';
$this->nversion = '20181101';
/**
* @var integer $this->last_modification_date
* @brief CaMykS last modification date
*/
$this->last_modification_date = mktime(0, 0, 0, 10, 1, 2018);
$this->last_modification_date = mktime(0, 0, 0, 11, 1, 2018);
/**
* @var string $this->engine_folder
@@ -4,9 +4,9 @@
* @details Engine / Object Library
* @file engine/lib/object/CImage.php.inc
* @author CaMykS Team <camyks.contact@gmail.com>
* @version 1.0.1
* @version 1.0.2
* @date Creation: Nov 2011
* @date Modification: Sep 2018
* @date Modification: Oct 2018
* @copyright 2011 - 2018 CaMykS Team
* @note This program is distributed as is - WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -389,9 +389,9 @@ final class CImage {
/* add background color */
if ($bgColor == '#transp' or $this->_gd_is_transparencyEnabled()) {
imageColorTransparent($newSrc, imageColorAllocateAlpha($newSrc, 0, 0, 0, 127));
imageAlphaBlending($newSrc, false);
imageSaveAlpha($newSrc, true);
imageFilledRectangle($newSrc, 0, 0, $width, $height, imageColorAllocateAlpha($newSrc, 255, 255, 255, 127));
} else {
imageFill($newSrc, 0, 0, $this->_gd_getAllocatedColor($bgColor, $newSrc));
}
@@ -4,16 +4,17 @@
* @details Engine / Object Library
* @file engine/lib/object/CPDF.php.inc
* @author CaMykS Team <camyks.contact@gmail.com>
* @version 1.0.1
* @version 1.0.2
* @date Creation: May 2010
* @date Modification: Jun 2018
* @date Modification: Oct 2018
* @copyright 2010 - 2018 CaMykS Team
* @note This program is distributed as is - WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* @warning This library is not loaded with CaMykS initialisation.
*/
require_once('FPDF/fpdf.php');
require_once('colors.php.inc');
/**
* CPDF class.
@@ -63,6 +64,126 @@ class CPDF extends FPDF {
$this->__construct($orientation, $unit, $format);
}
/* Override FPDF methods */
/**
* Write multiple lines at once
* @param int $w
* @param int $h
* @param string $txt
* @param mixed $border
* @param string $align
* @param boolean $fill
* @param integer $maxLines
* @return string
*/
public function MultiCell($w, $h, $txt, $border=0, $align='J', $fill=false, $maxLines=0) {
if ($maxLines == 0) {
parent::MultiCell($w, $h, $txt, $border, $align, $fill=false);
return '';
}
$cw = &$this->CurrentFont['cw'];
if ($w==0)
$w = $this->w-$this->rMargin-$this->x;
$wmax = ($w-2*$this->cMargin)*1000/$this->FontSize;
$s = str_replace("\r",'',$txt);
$nb = strlen($s);
if ($nb>0 && $s[$nb-1]=="\n")
$nb--;
$b=0;
if ($border) {
if ($border==1) {
$border='LTRB';
$b='LRT';
$b2='LR';
} else {
$b2='';
if (is_int(strpos($border,'L')))
$b2 .= 'L';
if (is_int(strpos($border,'R')))
$b2 .= 'R';
$b = is_int(strpos($border,'T')) ? $b2.'T' : $b2;
}
}
$sep = -1;
$i = 0;
$j = 0;
$l = 0;
$ns = 0;
$nl = 1;
while ($i<$nb) {
$c = $s[$i];
if ($c=="\n") {
if ($this->ws>0) {
$this->ws = 0;
$this->_out('0 Tw');
}
$this->Cell($w, $h, substr($s, $j, $i-$j), $b, 2, $align, $fill);
$i++;
$sep = -1;
$j = $i;
$l = 0;
$ns = 0;
$nl++;
if ($border && $nl==2)
$b=$b2;
if ($maxLines && $nl>$maxLines)
return substr($s,$i);
continue;
}
if ($c == ' ') {
$sep = $i;
$ls = $l;
$ns++;
}
$l += $cw[$c];
if ($l > $wmax) {
if ($sep==-1) {
if ($i == $j)
$i++;
if ($this->ws > 0) {
$this->ws = 0;
$this->_out('0 Tw');
}
$this->Cell($w, $h, substr($s, $j, $i-$j), $b, 2, $align, $fill);
} else {
if ($align=='J') {
$this->ws = ($ns > 1) ? ($wmax-$ls)/1000*$this->FontSize/($ns-1) : 0;
$this->_out(sprintf('%.3F Tw', $this->ws*$this->k));
}
$this->Cell($w, $h, substr($s, $j, $sep-$j), $b, 2, $align, $fill);
$i = $sep+1;
}
$sep = -1;
$j = $i;
$l = 0;
$ns = 0;
$nl++;
if ($border && $nl==2)
$b=$b2;
if ($maxLines && $nl>$maxLines) {
if ($this->ws > 0) {
$this->ws = 0;
$this->_out('0 Tw');
}
return substr($s, $i);
}
}
else
$i++;
}
if ($this->ws>0) {
$this->ws = 0;
$this->_out('0 Tw');
}
if ($border && is_int(strpos($border,'B')))
$b .= 'B';
$this->Cell($w, $h, substr($s, $j, $i-$j), $b, 2, $align, $fill);
$this->x = $this->lMargin;
return '';
}
/* specific methods */
/**
@@ -148,7 +269,7 @@ class CPDF extends FPDF {
* @return string
*/
public function decode_text($text) {
if ($this->serverEncoding == 'utf8')
if (string_isUTF8($text))
return utf8_decode($text);
return $text;
}
@@ -179,15 +300,15 @@ class CPDF extends FPDF {
* @param mixed $color
* @return string
*/
public function set_textColor($color) {
public function set_textColor($color='') {
/* color as hexa string */
if (is_string($color)) {
if ($color == '')
return $this->set_textColor($this->htmlParams['defaultTextColor']);
if (strlen($color) == 6)
return $this->set_textColor(hex2dec($color));
return $this->set_textColor(color_hex2rgb($color));
if (strlen($color) == 7)
return $this->set_textColor(hex2dec(substr($color, 1)));
return $this->set_textColor(color_hex2rgb(substr($color, 1)));
}
/* color as array */
@@ -420,4 +420,4 @@ final class Database_connection {
$this->close();
}
}
?>
?>
Oops, something went wrong.

0 comments on commit 0641f69

Please sign in to comment.
You can’t perform that action at this time.