Commits vergleichen

..

Keine gemeinsamen Commits. "0589fd287e3b3e29e70a73106c9c8404ea68a4b4" und "af5bf9be94e0ad0758e7ba1c54edb34f48359d6d" haben vollständig unterschiedliche Historien.

11 geänderte Dateien mit 113 neuen und 109 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
* @var array
*/
protected $_arrOutFilters = array('stripslashes', 'htmldecode','urldecode', 'utf8_encode');
protected $_arrOutFilters = array('stripslashes', 'htmldecode','urldecode');
/**
* Class name of meta object

Datei anzeigen

@ -1,5 +1,4 @@
<?php
/**
* Project:
* Contenido Content Management System
@ -30,6 +29,7 @@
* }}
*
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
@ -46,10 +46,12 @@ $rights_list_old = array();
while ($db->next_record()) { //set a new rights list fore this user
$rights_list_old[$db->f(3)."|".$db->f(4)."|".$db->f("idcat")] = "x";
}
if (($perm->have_perm_area_action($area, $action)) && ($action == "user_edit")) {
if (($perm->have_perm_area_action($area, $action)) && ($action == "user_edit"))
{
saverights();
}else {
if (!$perm->have_perm_area_action($area, $action)) {
if (!$perm->have_perm_area_action($area, $action))
{
$notification->displayNotification("error", i18n("Permission denied"));
}
}
@ -63,10 +65,12 @@ $sTable = '';
$sJsBefore .= "var itemids=new Array();
var actareaids=new Array(); \n";
if (($perm->have_perm_area_action($area, $action)) && ($action == "group_edit")) {
if (($perm->have_perm_area_action($area, $action)) && ($action == "group_edit"))
{
saverights();
}else {
if (!$perm->have_perm_area_action($area, $action)) {
if (!$perm->have_perm_area_action($area, $action))
{
$notification->displayNotification("error", i18n("Permission denied"));
}
}
@ -86,11 +90,13 @@ $sCheckboxesRow = '';
$aSecondHeaderRow = array();
// look for possible actions in mainarea []
foreach ($right_list["lay"] as $value2) {
foreach($right_list["lay"] as $value2)
{
//if there are some actions
if(is_array($value2["action"]))
//set the areas that are in use
foreach ($value2["action"] as $key3 => $value3) {
foreach($value2["action"] as $key3 => $value3)
{
$possible_areas[$value2["perm"]]="";
$colspan++;
//set the possible areas and actions for this areas
@ -99,6 +105,7 @@ foreach ($right_list["lay"] as $value2) {
//checkbox for the whole action
$sTable .= $oTable->header_cell($lngAct[$value2["perm"]][$value3]);
array_push($aSecondHeaderRow, "<input type=\"checkbox\" name=\"checkall_".$value2["perm"]."_$value3\" value=\"\" onClick=\"setRightsFor('".$value2["perm"]."','$value3','')\">");
}
}
@ -123,24 +130,29 @@ $sTable .= $oTable->end_row();
$sql = "SELECT * FROM ".$cfg["tab"]["lay"]." WHERE idclient='".Contenido_Security::toInteger($rights_client)."' ORDER BY name";
$db->query($sql);
while ($db->next_record()) {
$sTplName = clHtmlEntities($db->f("name"));
$sDescription = empty($db->f("description")) ? '' : clHtmlEntities($db->f("description"));
$sDescription = clHtmlEntities($db->f("description"));
$sTable .= $oTable->row();
$sTable .= $oTable->cell($sTplName, "", "", " class=\"td_rights0\"", false);
$sTable .= $oTable->cell($sDescription, "", "", " class=\"td_rights1\" style=\"white-space:normal; \"", false);
//set javscript array for itemids
$sJsBefore .= "itemids[\"".$db->f("idlay")."\"]=\"x\";\n";
// look for possible actions in mainarea[]
foreach ($right_list["lay"] as $value2) {
foreach($right_list["lay"] as $value2)
{
//if there area some
if(is_array($value2["action"]))
foreach ($value2["action"] as $key3 => $value3) {
foreach($value2["action"] as $key3 => $value3)
{
//does the user have the right
if(in_array($value2["perm"]."|$value3|".$db->f("idlay"),array_keys($rights_list_old)))
$checked="checked=\"checked\"";
@ -151,11 +163,15 @@ while ($db->next_record()) {
//set the checkbox the name consits of areait+actionid+itemid
//"<input type=\"checkbox\" name=\"rights_list[".$value2["perm"]."|$value3|".$db->f("idlay")."]\" value=\"x\" $checked>
$sTable .= $oTable->cell("<input type=\"checkbox\" name=\"rights_list[".$value2["perm"]."|$value3|".$db->f("idlay")."]\" value=\"x\" $checked>", "", "", " class=\"td_rights3\"", false );
}
}
//checkbox for checking all actions fore this itemid
$sTable .= $oTable->cell("<input type=\"checkbox\" name=\"checkall_".$value2["perm"]."_".$value3."_".$db->f("idlay")."\" value=\"\" onClick=\"setRightsFor('".$value2["perm"]."','$value3','".$db->f("idlay")."')\">","", "", " class=\"td_rights3\"", false);
$sTable .= $oTable->end_row();
}
$sTable .= $oTable->end_row();
@ -164,9 +180,12 @@ $sTable .= $oTable->sumcell("<a href=javascript:submitrightsform('','area')><img
$sTable .= $oTable->end_row();
$sTable .= $oTable->end_table();
// generate Template
$oTpl->set('s', 'JS_SCRIPT_BEFORE', $sJsBefore);
$oTpl->set('s', 'JS_SCRIPT_AFTER', $sJsAfter);
$oTpl->set('s', 'RIGHTS_CONTENT', $sTable);
$oTpl->set('s', 'EXTERNAL_SCRIPTS', $sJsExternal);
$oTpl->generate('templates/standard/'.$cfg['templates']['rights_inc']);
?>

Datei anzeigen

@ -117,7 +117,7 @@ $db->query($sql);
while ($db->next_record()) {
$tplname = clHtmlEntities($db->f("name"));
$description = empty($db->f("description"))?'':clHtmlEntities($db->f("description"));
$description = clHtmlEntities($db->f("description"));
$sTable .= $table->row();
$sTable .= $table->cell($tplname,"", "", " class=\"td_rights0\"", false);

Datei anzeigen

@ -122,7 +122,7 @@ $db->query($sql);
while ($db->next_record()) {
$tplname = clHtmlEntities($db->f("name"));
$description = empty($db->f("description"))?'':clHtmlEntities($db->f("description"));
$description = clHtmlEntities($db->f("description"));
$sTable .= $table->row();
$sTable .= $table->cell($tplname,"", "", " class=\"td_rights0\"", false);

Datei anzeigen

@ -174,11 +174,6 @@ if (!$perm->have_perm_area_action($area, $action)) {
}
$aFileInfo = getFileInformation($client, $sTempFilename, $sTypeContent, $db);
if(!empty($aFileInfo["description"])) {
$sDescription = clHtmlSpecialChars($aFileInfo["description"]);
} else {
$sDescription = '';
}
$form = new UI_Table_Form("file_editor");
$form->addHeader(i18n("Edit file"));
@ -191,7 +186,7 @@ if (!$perm->have_perm_area_action($area, $action)) {
$tb_name = new cHTMLTextbox("file", $sFilename, 60);
$ta_code = new cHTMLTextarea("code", clHtmlSpecialChars($sCode), 100, 35, "code");
$descr = new cHTMLTextarea("description", $sDescription, 100, 5);
$descr = new cHTMLTextarea("description", clHtmlSpecialChars($aFileInfo["description"]), 100, 5);
$ta_code->setStyle("font-family: monospace;width: 100%;");
$descr->setStyle("font-family: monospace;width: 100%;");

Datei anzeigen

@ -134,11 +134,6 @@ if (!$perm->have_perm_area_action($area, $action)) {
# generate edit form
if (isset($_REQUEST['action'])) {
$aFileInfo = getFileInformation($client, $sFilename, $sTypeContent, $db);
if(!empty($aFileInfo["description"])) {
$sDescription = clHtmlSpecialChars($aFileInfo["description"]);
} else {
$sDescription = '';
}
$sAction = ($bEdit) ? $sActionEdit : $_REQUEST['action'];
@ -159,7 +154,7 @@ if (!$perm->have_perm_area_action($area, $action)) {
$tb_name = new cHTMLTextbox("file", $sFilename, 60);
$ta_code = new cHTMLTextarea("code", clHtmlSpecialChars($sCode), 100, 35, "code");
$descr = new cHTMLTextarea("description", $sDescription, 100, 5);
$descr = new cHTMLTextarea("description", clHtmlSpecialChars($aFileInfo["description"]), 100, 5);
$ta_code->setStyle("font-family: monospace;width: 100%;");
$descr->setStyle("font-family: monospace;width: 100%;");

Datei anzeigen

@ -158,9 +158,11 @@ if (!$perm->have_perm_area_action($area, $action)) {
if ($_REQUEST['action'] == $sActionEdit) {
$sCode = getFileContent($sFilename, $path);
} else {
$sCode = $_REQUEST['code'];
$sCode = $_REQUEST['code']; # stripslashes is required here in case of creating a new file
}
$aFileInfo = getFileInformation($client, $sTempFilename, "css", $db);
$form = new UI_Table_Form("file_editor");
$form->addHeader(i18n("Edit file"));
$form->setWidth("100%");
@ -171,24 +173,16 @@ if (!$perm->have_perm_area_action($area, $action)) {
$form->setVar("tmp_file", $sTempFilename);
$tb_name = new cHTMLTextbox("file", $sFilename, 60);
$form->add(i18n("Name"), $tb_name);
$ta_code = new cHTMLTextarea("code", clHtmlSpecialChars($sCode), 100, 35, "code");
$ta_code->updateAttributes(array("wrap" => getEffectiveSetting('style_editor', 'wrap', 'off')));
$descr = new cHTMLTextarea("description", clHtmlSpecialChars($aFileInfo["description"]), 100, 5);
$ta_code->setStyle("font-family: monospace;width: 100%;");
$form->add(i18n("Code"), $ta_code);
$aFileInfo = getFileInformation($client, $sTempFilename, "css", $db);
if(!empty($aFileInfo["description"])) {
$sDescription = clHtmlSpecialChars($aFileInfo["description"]);
} else {
$sDescription = '';
}
$descr = new cHTMLTextarea("description", $sDescription, 100, 5);
$descr->setStyle("font-family: monospace;width: 100%;");
$ta_code->updateAttributes(array("wrap" => getEffectiveSetting('style_editor', 'wrap', 'off')));
$form->add(i18n("Name"), $tb_name);
$form->add(i18n("Description"), $descr->render());
$form->add(i18n("Code"), $ta_code);
$page->setContent($form->render());
@ -199,3 +193,4 @@ if (!$perm->have_perm_area_action($area, $action)) {
$page->render();
}
}
?>

Datei anzeigen

@ -118,7 +118,7 @@ $db->query($sql);
while ($db->next_record()) {
$tplname = clHtmlEntities($db->f("name"));
$description = empty($db->f("description"))?'':clHtmlEntities($db->f("description"));
$description = clHtmlEntities($db->f("description"));
$sTable .= $table->row();
$sTable .= $table->cell($tplname,"", "", " class=\"td_rights0\"", false);

Datei anzeigen

@ -117,7 +117,7 @@ $db->query($sql);
while ($db->next_record()) {
$tplname = clHtmlEntities($db->f("name"));
$description = empty($db->f("description"))?'':clHtmlEntities($db->f("description"));
$description = clHtmlEntities($db->f("description"));
$sTable .= $table->row();
$sTable .= $table->cell($tplname,"", "", " class=\"td_rights0\"", false);

Datei anzeigen

@ -112,14 +112,14 @@ foreach ($aSecondHeaderRow as $value) {
$sTable .= $table->end_row();
//Select the itemid
//Select the itemid<EFBFBD>s
$sql = "SELECT * FROM ".$cfg["tab"]["tpl"]." WHERE idclient='".Contenido_Security::toInteger($rights_client)."' ORDER BY name";
$db->query($sql);
while ($db->next_record()) {
$tplname = clHtmlEntities($db->f("name"));
$description = empty($db->f("description"))?'':clHtmlEntities($db->f("description"));
$description = clHtmlEntities($db->f("description"));
$sTable .= $table->row();
$sTable .= $table->cell($tplname,"", "", " class=\"td_rights0\"", false);

Datei anzeigen

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta charset="UTF-8" />
<title>template.tplcfg_edit_form.html</title>
<link rel="stylesheet" type="text/css" href="styles/jquery-ui.css">
<link rel="stylesheet" type="text/css" href="styles/contenido.css">