recode wrapper functions;

fixed encoding problems in mod translate;
change handling for encoding and charset in page widget
Dieser Commit ist enthalten in:
o.pinke 2023-02-10 10:57:30 +01:00
Ursprung 34d2c9ca2a
Commit 7ca3bf10bb
14 geänderte Dateien mit 198 neuen und 170 gelöschten Zeilen

Datei anzeigen

@ -1311,7 +1311,7 @@ abstract class Item extends cItemBaseAbstract {
* List of funcion names of the filtersused when data is retrieved from the db * List of funcion names of the filtersused when data is retrieved from the db
* @var array * @var array
*/ */
protected $_arrOutFilters = array('stripslashes', 'htmldecode', 'urldecode'); protected $_arrOutFilters = array('stripslashes', 'htmldecode','urldecode');
/** /**
* Class name of meta object * Class name of meta object

Datei anzeigen

@ -130,7 +130,7 @@ class cI18n {
// Is emulator to use? // Is emulator to use?
if (!$cfg['native_i18n']) { if (!$cfg['native_i18n']) {
return htmlentities(self::emulateGettext($string, $domain)); return self::emulateGettext($string, $domain);
} }
// Try to use native gettext implementation // Try to use native gettext implementation

Datei anzeigen

@ -320,8 +320,12 @@ class cPage extends cHTML {
} }
$meta = ''; $meta = '';
if ($this->_encoding != "" && !$this->_isHtml5) { if(!empty($this->_encoding)) {
$meta .= '<meta http-equiv="Content-type" content="text/html;charset=' . $this->_encoding . '">' . "\n"; if($this->_isHtml5) {
$meta .= '<meta charset="' . $this->_encoding . '">' . "\n";
} else {
$meta .= '<meta http-equiv="Content-type" content="text/html;charset=' . $this->_encoding . '">' . "\n";
}
} }
if ($this->_object !== false && method_exists($this->_object, "render")) { if ($this->_object !== false && method_exists($this->_object, "render")) {

0
conlite/external/endroid/qr-code/composer.json vendored Ausführbare Datei → Normale Datei
Datei anzeigen

0
conlite/external/endroid/qr-code/src/QrCode.php vendored Ausführbare Datei → Normale Datei
Datei anzeigen

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -30,7 +31,6 @@
* }} * }}
* *
*/ */
if (!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
@ -73,18 +73,17 @@ if (!defined('CON_FRAMEWORK')) {
* @param string $bReturnPath Flag to return the path instead of including the file * @param string $bReturnPath Flag to return the path instead of including the file
* @return void * @return void
*/ */
function contenido_include($sWhere, $sWhat, $bForce = false, $bReturnPath = false) function contenido_include($sWhere, $sWhat, $bForce = false, $bReturnPath = false) {
{
global $client, $cfg, $cfgClient; global $client, $cfg, $cfgClient;
// Sanity check for $sWhat // Sanity check for $sWhat
$sWhat = trim($sWhat); $sWhat = trim($sWhat);
$sWhere = strtolower($sWhere); $sWhere = strtolower($sWhere);
$bError = false; $bError = false;
switch ($sWhere) { switch ($sWhere) {
case 'config': case 'config':
$sInclude = $cfg['path']['config']. $sWhat; $sInclude = $cfg['path']['config'] . $sWhat;
break; break;
case 'frontend': case 'frontend':
$sInclude = $cfgClient[$client]['path']['frontend'] . $sWhat; $sInclude = $cfgClient[$client]['path']['frontend'] . $sWhat;
@ -113,7 +112,7 @@ function contenido_include($sWhere, $sWhat, $bForce = false, $bReturnPath = fals
unset($sWhere); unset($sWhere);
} else { } else {
$aPaths = explode(PATH_SEPARATOR, ini_get('include_path')); $aPaths = explode(PATH_SEPARATOR, ini_get('include_path'));
$iLast = count($aPaths) - 1; $iLast = count($aPaths) - 1;
if ($iLast >= 2) { if ($iLast >= 2) {
$tmp = $aPaths[1]; $tmp = $aPaths[1];
$aPaths[1] = $aPaths[$iLast]; $aPaths[1] = $aPaths[$iLast];
@ -176,14 +175,14 @@ function contenido_include($sWhere, $sWhat, $bForce = false, $bReturnPath = fals
if ($bError) { if ($bError) {
$aBackTrace = debug_backtrace(); $aBackTrace = debug_backtrace();
if(is_array($aBackTrace[1])) { if (is_array($aBackTrace[1])) {
$sError = " in <b>".$aBackTrace[1]['file'] $sError = " in <b>" . $aBackTrace[1]['file']
."</b> on line <b>".$aBackTrace[1]['line'] . "</b> on line <b>" . $aBackTrace[1]['line']
."</b> <i>function</i>: ".$aBackTrace[1]['function']." "; . "</b> <i>function</i>: " . $aBackTrace[1]['function'] . " ";
} else { } else {
$sError = ""; $sError = "";
} }
trigger_error("Can't include $sInclude $sError", E_USER_ERROR); trigger_error("Can't include $sInclude $sError", E_USER_ERROR);
return; return;
} }
@ -196,7 +195,6 @@ function contenido_include($sWhere, $sWhat, $bForce = false, $bReturnPath = fals
} }
} }
/** /**
* Shortcut to contenido_include. * Shortcut to contenido_include.
* *
@ -207,8 +205,7 @@ function contenido_include($sWhere, $sWhat, $bForce = false, $bReturnPath = fals
* @param bool $bForce If true, force the file to be included * @param bool $bForce If true, force the file to be included
* @return void * @return void
*/ */
function cInclude($sWhere, $sWhat, $bForce = false) function cInclude($sWhere, $sWhat, $bForce = false) {
{
contenido_include($sWhere, $sWhat, $bForce); contenido_include($sWhere, $sWhat, $bForce);
} }
@ -224,21 +221,18 @@ function cInclude($sWhere, $sWhat, $bForce = false)
*/ */
function plugin_include($sWhere, $sWhat) { function plugin_include($sWhere, $sWhat) {
global $cfg; global $cfg;
$sInclude = $cfg['path']['contenido'] . $cfg['path']['plugins'] . $sWhere. '/' . $sWhat; $sInclude = $cfg['path']['contenido'] . $cfg['path']['plugins'] . $sWhere . '/' . $sWhat;
if(is_readable($sInclude)) { if (is_readable($sInclude)) {
include_once($sInclude); include_once($sInclude);
} else { } else {
$sCaller = ""; $sCaller = "";
$aTrace = debug_backtrace(); $aTrace = debug_backtrace();
foreach($aTrace as $iKey=>$aValue) { foreach ($aTrace as $iKey => $aValue) {
if($aValue['function'] == __METHOD__) { if ($aValue['function'] == __METHOD__) {
$sCaller = $aValue['file']." line ".$aValue['line']; $sCaller = $aValue['file'] . " line " . $aValue['line'];
break; break;
} }
} }
trigger_error("Function ".__METHOD__.": Can't include $sInclude in ".$sCaller, E_USER_WARNING); trigger_error("Function " . __METHOD__ . ": Can't include $sInclude in " . $sCaller, E_USER_WARNING);
} }
} }
?>

Datei anzeigen

@ -2221,4 +2221,66 @@ function IP_match($network, $mask, $ip) {
} }
} }
?> /**
* Wrapper for php-function htmlspecialchars
*
* @author Ortwin Pinke <ortwinpinke@conlite.org>
* @since 2.3.0
* @uses htmlspecialchars php-function
*
* @param string $value
* @param int $flags
* @param string $encoding default UTF-8
* @return string Returns the converted string
*/
function clHtmlSpecialChars(string $value, int $flags = ENT_COMPAT|ENT_HTML401, string $encoding = 'UTF-8') {
return htmlspecialchars($value, $flags, $encoding);
}
/**
* Wrapper for php-function html_entity_decode
*
* @author Ortwin Pinke <ortwinpinke@conlite.org>
* @since 2.3.0
* @uses html_entity_decode php-function
*
* @param string $value
* @param int $flags
* @param string $encoding default UTF-8
* @return string Returns the decoded string
*/
function clHtmlEntityDecode(string $value, int $flags = ENT_COMPAT|ENT_HTML401, string $encoding = 'UTF-8') {
return html_entity_decode($value, $flags, $encoding);
}
/**
* Wrapper for php-function htmlentities
*
* @author Ortwin Pinke <ortwinpinke@conlite.org>
* @since 2.3.0
* @uses htmlentities php-function
*
* @param string $value
* @param int $flags
* @param string $encoding default UTF-8
* @return string Returns the converted string
*/
function clHtmlEntities(string $value, int $flags = ENT_COMPAT|ENT_HTML401, string $encoding = 'UTF-8') {
return htmlentities($value, $flags, $encoding);
}
/**
* Wrapper for php-function get_html_translation_table
*
* @author Ortwin Pinke <ortwinpinke@conlite.org>
* @since 2.3.0
* @uses get_html_translation_table php-function
*
* @param int $table
* @param int $flags
* @param string $encoding
* @return array
*/
function clGetHtmlTranslationTable(int $table = HTML_SPECIALCHARS, int $flags = ENT_COMPAT|ENT_HTML401, string $encoding = null) {
return get_html_translation_table($table, $flags, $encoding);
}

Datei anzeigen

@ -60,10 +60,11 @@ function clPhp54FixedFunc($funcname, $value, $flags = '', $encoding = '') {
* @param string $encoding * @param string $encoding
* @return string * @return string
*/ */
/*
function clHtmlSpecialChars($value, $flags = '', $encoding = '') { function clHtmlSpecialChars($value, $flags = '', $encoding = '') {
return clPhp54FixedFunc("htmlspecialchars", $value, $flags, $encoding); return clPhp54FixedFunc("htmlspecialchars", $value, $flags, $encoding);
} }
*/
/** /**
* *
* @uses clPhp54FixedFunc multi fix func for PHP5.4 * @uses clPhp54FixedFunc multi fix func for PHP5.4
@ -74,9 +75,12 @@ function clHtmlSpecialChars($value, $flags = '', $encoding = '') {
* @param string $encoding * @param string $encoding
* @return string * @return string
*/ */
/*
function clHtmlEntityDecode($value, $flags = '', $encoding = '') { function clHtmlEntityDecode($value, $flags = '', $encoding = '') {
return clPhp54FixedFunc("html_entity_decode", $value, $flags, $encoding); return clPhp54FixedFunc("html_entity_decode", $value, $flags, $encoding);
} }
*
*/
/** /**
* *
@ -88,9 +92,12 @@ function clHtmlEntityDecode($value, $flags = '', $encoding = '') {
* @param string $encoding * @param string $encoding
* @return string * @return string
*/ */
/*
function clHtmlEntities($value, $flags = '', $encoding = '') { function clHtmlEntities($value, $flags = '', $encoding = '') {
return clPhp54FixedFunc("htmlentities", $value, $flags, $encoding); return clPhp54FixedFunc("htmlentities", $value, $flags, $encoding);
} }
*
*/
/** /**
* *
@ -101,9 +108,12 @@ function clHtmlEntities($value, $flags = '', $encoding = '') {
* @param mixed $flags * @param mixed $flags
* @return string * @return string
*/ */
/*
function clGetHtmlTranslationTable($table = '', $flags = '') { function clGetHtmlTranslationTable($table = '', $flags = '') {
return clPhp54FixedFunc("get_html_translation_table", $table, $flags); return clPhp54FixedFunc("get_html_translation_table", $table, $flags);
} }
*
*/
// hold old functions from con 4.8 but use new ConLite functions, mark them as deprecated // hold old functions from con 4.8 but use new ConLite functions, mark them as deprecated
@ -112,38 +122,11 @@ function clGetHtmlTranslationTable($table = '', $flags = '') {
* Use compatible clHtmlSpecialChars instead * Use compatible clHtmlSpecialChars instead
* @deprecated since version 2.0 * @deprecated since version 2.0
*/ */
/**
if (function_exists('conHtmlSpecialChars') == false) { if (function_exists('conHtmlSpecialChars') == false) {
function conHtmlSpecialChars($value, $flags = '', $encoding = '') { function conHtmlSpecialChars($value, $flags = '', $encoding = '') {
return clHtmlSpecialChars($value, $flags, $encoding); return clHtmlSpecialChars($value, $flags, $encoding);
} }
} }
*
/** */
* Use compatible clHtmlEntityDecode instead
* @deprecated since version 2.0
*/
if (function_exists('conHtmlEntityDecode') == false) {
function conHtmlEntityDecode($value, $flags = '', $encoding = '') {
return clHtmlEntityDecode($value, $flags, $encoding);
}
}
/**
* Use compatible clHtmlEntities instead
* @deprecated since version 2.0
*/
if (function_exists('conHtmlentities') == false) {
function conHtmlentities($value, $flags = '', $encoding = '') {
return clHtmlEntities($value, $flags, $encoding);
}
}
/**
* Use compatible clGetHtmlTranslationTable instead
* @deprecated since version 2.0
*/
if (function_exists('conGetHtmlTranslationTable') == false) {
function conGetHtmlTranslationTable($table = '', $flags = '') {
return clGetHtmlTranslationTable($table, $flags);
}
}

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -28,111 +29,96 @@
* }} * }}
* *
*/ */
if (!defined('CON_FRAMEWORK')) { if (!defined('CON_FRAMEWORK')) {
die('Illegal call'); die('Illegal call');
} }
$langobj = new cApiLanguage($lang); $langobj = new cApiLanguage($lang);
$langstring = $langobj->get("name") . ' ('.$lang.')'; $langstring = $langobj->get("name") . ' (' . $lang . ')';
$moduletranslations = new cApiModuleTranslationCollection; $moduletranslations = new cApiModuleTranslationCollection;
$module = new cApiModule($idmod); $module = new cApiModule($idmod);
if ($action == "mod_translation_save") if ($action == "mod_translation_save") {
{ $strans = new cApiModuleTranslation;
$strans = new cApiModuleTranslation; $strans->loadByPrimaryKey($idmodtranslation);
$strans->loadByPrimaryKey($idmodtranslation);
if ($strans->get("idmod") == $idmod) if ($strans->get("idmod") == $idmod) {
{ $module->setTranslatedName($translatedname);
$module->setTranslatedName($translatedname);
$strans->set("translation", stripslashes($t_trans)); $strans->set("translation", stripslashes($t_trans));
$strans->store(); $strans->store();
/* Increase idmodtranslation */ /* Increase idmodtranslation */
$moduletranslations->select("idmod = '$idmod' AND idlang = '$lang'"); $moduletranslations->select("idmod = '$idmod' AND idlang = '$lang'");
while ($mitem = $moduletranslations->next()) while ($mitem = $moduletranslations->next()) {
{ if ($mitem->get("idmodtranslation") == $idmodtranslation) {
if ($mitem->get("idmodtranslation") == $idmodtranslation) $mitem2 = $moduletranslations->next();
{
$mitem2 = $moduletranslations->next();
if (is_object($mitem2)) if (is_object($mitem2)) {
{ $idmodtranslation = $mitem2->get("idmodtranslation");
$idmodtranslation = $mitem2->get("idmodtranslation"); break;
break; }
} }
} }
} }
}
} }
if ($action == "mod_importexport_translation") if ($action == "mod_importexport_translation") {
{ if ($mode == "export") {
if ($mode == "export") $sFileName = uplCreateFriendlyName(strtolower($module->get("name") . "_" . $langobj->get("name")));
{
$sFileName = uplCreateFriendlyName(strtolower($module->get("name") . "_" . $langobj->get("name")));
if ($sFileName != "") if ($sFileName != "") {
{ $moduletranslations->export($idmod, $lang, $sFileName . ".xml");
$moduletranslations->export($idmod, $lang, $sFileName . ".xml"); }
} }
} if ($mode == "import") {
if ($mode == "import") if (file_exists($_FILES["upload"]["tmp_name"])) {
{ $moduletranslations->import($idmod, $lang, $_FILES["upload"]["tmp_name"]);
if (file_exists($_FILES["upload"]["tmp_name"])) }
{ }
$moduletranslations->import($idmod, $lang, $_FILES["upload"]["tmp_name"]); }
}
}
}
if (!isset($idmodtranslation)) if (!isset($idmodtranslation)) {
{ $idmodtranslation = 0;
$idmodtranslation = 0;
} }
$mtrans = new cApiModuleTranslation; $mtrans = new cApiModuleTranslation;
$mtrans->loadByPrimaryKey($idmodtranslation); $mtrans->loadByPrimaryKey($idmodtranslation);
if ($mtrans->get("idmod") != $idmod) if ($mtrans->get("idmod") != $idmod) {
{ $moduletranslations->select("idmod = '$idmod' AND idlang = '$lang'", '', 'idmodtranslation DESC', '1');
$moduletranslations->select("idmod = '$idmod' AND idlang = '$lang'", '', 'idmodtranslation DESC', '1'); $mtrans = $moduletranslations->next();
$mtrans = $moduletranslations->next();
if (is_object($mtrans)) {
if (is_object($mtrans)) $idmodtranslation = $mtrans->get("idmodtranslation");
{ } else {
$idmodtranslation = $mtrans->get("idmodtranslation"); $mtrans = new cApiModuleTranslation;
} else { }
$mtrans = new cApiModuleTranslation;
}
} }
$strings = $module->parseModuleForStrings(); $strings = $module->parseModuleForStrings();
/* Insert new strings */ /* Insert new strings */
foreach ($strings as $string) foreach ($strings as $string) {
{ $moduletranslations->create($idmod, $lang, $string);
$moduletranslations->create($idmod, $lang, $string);
} }
$moduletranslations->select("idmod = '$idmod' AND idlang = '$lang'"); $moduletranslations->select("idmod = '$idmod' AND idlang = '$lang'");
while ($d_modtrans = $moduletranslations->next()) while ($d_modtrans = $moduletranslations->next()) {
{ if (!in_array($d_modtrans->get("original"), $strings)) {
if (!in_array($d_modtrans->get("original"), $strings)) $moduletranslations->delete($d_modtrans->get("idmodtranslation"));
{ }
$moduletranslations->delete($d_modtrans->get("idmodtranslation"));
}
} }
$page = new cPage; $page = new cPage;
$page->setHtml5();
$page->setEncoding('UTF-8');
$form = new UI_Table_Form("translation"); $form = new UI_Table_Form("translation");
$form->addHeader(sprintf(i18n("Translate module '%s'"), $module->get("name"))); $form->addHeader(sprintf(i18n("Translate module '%s'"), $module->get("name")));
@ -142,7 +128,7 @@ $form->setVar("idmod", $idmod);
$form->setVar("idmodtranslation", $idmodtranslation); $form->setVar("idmodtranslation", $idmodtranslation);
$form->setVar("action", "mod_translation_save"); $form->setVar("action", "mod_translation_save");
$transmodname = new cHTMLTextbox("translatedname", $module->getTranslatedName(),60); $transmodname = new cHTMLTextbox("translatedname", $module->getTranslatedName(), 60);
$form->add(i18n("Translated Name"), $transmodname); $form->add(i18n("Translated Name"), $transmodname);
@ -152,22 +138,21 @@ $ilink->setCustom("idmod", $idmod);
$ilink->setCustom("idmodtranslation", $mtrans->get("idmodtranslation")); $ilink->setCustom("idmodtranslation", $mtrans->get("idmodtranslation"));
$ilink->setAnchor($mtrans->get("idmodtranslation")); $ilink->setAnchor($mtrans->get("idmodtranslation"));
$iframe = '<iframe frameborder="0" style="border: 1px;border-color: black; border-style: solid;" width="620" src="'.$ilink->getHREF().'"></iframe>'; $iframe = '<iframe frameborder="0" style="border: 1px;border-color: black; border-style: solid;" width="620" src="' . $ilink->getHREF() . '"></iframe>';
$table = '<table border="0" width="600" border="0"><tr><td width="50%">'.i18n("Original module string").'</td><td width="50%">'.sprintf(i18n("Translation for %s"), $langstring).'</td><td width="20">&nbsp;</td></tr><tr><td colspan="3">'.$iframe.'</td></tr>'; $table = '<table border="0" width="600" border="0"><tr><td width="50%">' . i18n("Original module string") . '</td><td width="50%">' . sprintf(i18n("Translation for %s"), $langstring) . '</td><td width="20">&nbsp;</td></tr><tr><td colspan="3">' . $iframe . '</td></tr>';
$original = new cHTMLTextarea("t_orig",clHtmlSpecialChars($mtrans->get("original"))); $original = new cHTMLTextarea("t_orig", clHtmlSpecialChars($mtrans->get("original")));
$original->setStyle("width: 300px;"); $original->setStyle("width: 300px;");
$translated = new cHTMLTextarea("t_trans",clHtmlSpecialChars($mtrans->get("translation"))); $translated = new cHTMLTextarea("t_trans", $mtrans->get("translation"));
$translated->setStyle("width: 300px;"); $translated->setStyle("width: 300px;");
$table .= '<tr><td>'.$original->render().'</td><td>'.$translated->render().'</td><td width="20">&nbsp;</td></tr></table>'; $table .= '<tr><td>' . $original->render() . '</td><td>' . $translated->render() . '</td><td width="20">&nbsp;</td></tr></table>';
$table .= i18n("Hint: Hit ALT+SHIFT+S to save the translated entry and advance to the next string."); $table .= i18n("Hint: Hit ALT+SHIFT+S to save the translated entry and advance to the next string.");
$form->add(i18n("String list"), $table); $form->add(i18n("String list"), $table);
$mark = '<script language="JavaScript">document.translation.t_trans.focus();</script>'; $mark = '<script language="JavaScript">document.translation.t_trans.focus();</script>';
$import = new cHTMLRadiobutton("mode", "import"); $import = new cHTMLRadiobutton("mode", "import");
$export = new cHTMLRadiobutton("mode", "export"); $export = new cHTMLRadiobutton("mode", "export");
$export->setLabelText(i18n("Export to file")); $export->setLabelText(i18n("Export to file"));
@ -189,15 +174,14 @@ $form2->setVar("idmod", $idmod);
$form2->setVar("idmodtranslation", $idmodtranslation); $form2->setVar("idmodtranslation", $idmodtranslation);
$form2->custom["submit"]["accesskey"] = ''; $form2->custom["submit"]["accesskey"] = '';
$page->setContent($form->render(). $mark ."<br>". $form2->render()); $page->setContent($form->render() . $mark . "<br>" . $form2->render());
$page->setMarkScript(2); $page->setMarkScript(2);
$clang = new cApiLanguage($lang); $clang = new cApiLanguage($lang);
$page->setEncoding($clang->get("encoding")); $page->setEncoding($clang->get("encoding"));
if (!($action == "mod_importexport_translation" && $mode == "export")) if (!($action == "mod_importexport_translation" && $mode == "export")) {
{ $page->render();
$page->render();
} }
?> ?>

Datei anzeigen

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Project: * Project:
* Contenido Content Management System * Contenido Content Management System
@ -27,9 +28,8 @@
* }} * }}
* *
*/ */
if (!defined('CON_FRAMEWORK')) {
if(!defined('CON_FRAMEWORK')) { die('Illegal call');
die('Illegal call');
} }
@ -37,6 +37,8 @@ $translations = new cApiModuleTranslationCollection;
$translations->select("idmod = '$idmod' AND idlang='$lang'"); $translations->select("idmod = '$idmod' AND idlang='$lang'");
$page = new cPage; $page = new cPage;
$page->setHtml5();
$page->setEncoding('UTF-8');
$page->setMargin(0); $page->setMargin(0);
$v = '<table cellspacing="0" cellpadding="0" width="600">'; $v = '<table cellspacing="0" cellpadding="0" width="600">';
@ -46,32 +48,35 @@ $link->setCLink("mod_translate", 4, "");
$mylink = new cHTMLLink; $mylink = new cHTMLLink;
while ($translation = $translations->next()) while ($translation = $translations->next()) {
{
$string = $translation->get("original"); $string = utf8_encode($translation->get("original"));
$tstring = $translation->get("translation"); $tstring = utf8_encode($translation->get("translation"));
$link->setCustom("idmod", $idmod); $link->setCustom("idmod", $idmod);
$link->setCustom("idmodtranslation", $translation->get("idmodtranslation")); $link->setCustom("idmodtranslation", $translation->get("idmodtranslation"));
$href = $link->getHREF(); $href = $link->getHREF();
$mylink->setLink('javascript:parent.location="'.$href.'"'); $mylink->setLink('javascript:parent.location="' . $href . '"');
$mylink->setContent($string); $mylink->setContent($string);
$dark = !$dark; $dark = !$dark;
if ($dark) if ($dark) {
{ $bgcol = $cfg["color"]["table_dark"];
$bgcol = $cfg["color"]["table_dark"]; } else {
} else { $bgcol = $cfg["color"]["table_light"];
$bgcol = $cfg["color"]["table_light"]; }
}
if ($idmodtranslation == $translation->get("idmodtranslation")) if ($idmodtranslation == $translation->get("idmodtranslation")) {
{ $bgcol = $cfg["color"]["table_active"];
$bgcol = $cfg["color"]["table_active"]; }
} $v .= '<tr bgcolor="' . $bgcol . '">'."\n"
$v .= '<tr bgcolor="'.$bgcol.'"><td style="padding-left: 2px; padding-top:2px; padding-bottom: 2px;" width="50%"><a name="'.$translation->get("idmodtranslation").'"></a>'.$mylink->render().'</td><td style="padding-left: 2px;">'.$tstring.'</td></tr>'; . '<td style="padding-left: 2px; padding-top:2px; padding-bottom: 2px;" width="50%">'."\n"
. '<a name="' . $translation->get("idmodtranslation") . '"></a>'."\n"
. $mylink->render() . '</td>'."\n"
. '<td style="padding-left: 2px;">' . $tstring . '</td>'."\n"
. '</tr>'."\n";
} }
$v .= '</table>'; $v .= '</table>';
@ -82,5 +87,4 @@ $clang = new cApiLanguage($lang);
$page->setEncoding($clang->get("encoding")); $page->setEncoding($clang->get("encoding"));
$page->render(); $page->render();
?> ?>

Datei anzeigen

@ -50,8 +50,8 @@ $formaction = $sess->url("main.php");
#<input type="hidden" name="action" value="tplcfg_edit"> #<input type="hidden" name="action" value="tplcfg_edit">
$hidden = '<input type="hidden" name="area" value="tpl_cfg"> $hidden = '<input type="hidden" name="area" value="tpl_cfg">
<input type="hidden" name="frame" value="'.$frame.'"> <input type="hidden" name="frame" value="'.$frame.'">
<input type="hidden" name="idcat" value="'.$idcat.'"> <input type="hidden" name="idcat" value="'.cRegistry::getCategoryId().'">
<input type="hidden" name="idart" value="'.$idart.'"> <input type="hidden" name="idart" value="'.cRegistry::getArticleId().'">
<input type="hidden" name="idtpl" value="'.$idtpl.'"> <input type="hidden" name="idtpl" value="'.$idtpl.'">
<input type="hidden" name="lang" value="'.$lang.'"> <input type="hidden" name="lang" value="'.$lang.'">
<input type="hidden" name="idtplcfg" value="'.$idtplcfg.'"> <input type="hidden" name="idtplcfg" value="'.$idtplcfg.'">
@ -154,7 +154,5 @@ $buttons = '<a href="javascript:history.back()"><img src="images/but_cancel.gif"
<input type="image" src="images/but_ok.gif">'; <input type="image" src="images/but_ok.gif">';
$tpl->set('s', 'BUTTONS', $buttons); $tpl->set('s', 'BUTTONS', $buttons);
# Generate template # Generate template
$tpl->generate($cfg['path']['templates'] . $cfg['templates']['tplcfg_edit_form']); $tpl->generate($cfg['path']['templates'] . $cfg['templates']['tplcfg_edit_form']);
?>

Datei anzeigen

@ -71,7 +71,7 @@ if (!defined('CL_ENVIRONMENT')) {
*/ */
if (!defined('CL_VERSION')) { if (!defined('CL_VERSION')) {
define('CL_VERSION', '2.2.0 beta'); define('CL_VERSION', '2.3.0 RC');
} }

@ -1 +1 @@
Subproject commit 91b0fd8c15cdf1b5e9704c8720a40f959e7eb4fe Subproject commit 4c3d78a0443921bdc3adcaf89c151d94e8f4a876

Datei anzeigen

@ -1,7 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="UTF-8" />
<title></title> <title></title>
{META} {META}
<link rel="stylesheet" type="text/css" href="styles/contenido.css"> <link rel="stylesheet" type="text/css" href="styles/contenido.css">