Line...
574 deleted because $page is a parameter here and no global variable
577 moved from end of function to this position: hover effect in first line bug fixed
670 to 677:
if(isset($templates[$one->TemplateId()]->name) && $templates[$one->TemplateId()]->name && check_permission($userid, 'Modify Templates'))
{
$thelist .= "TemplateId()."&from=content">".$templates[$one->TemplateId()]->name."\n";
}
elseif (isset($templates[$one->TemplateId()]->name) && $templates[$one->TemplateId()]->name)
{
$thelist .= "".$templates[$one->TemplateId()]->name."\n";
}
no link if the user has no permission to edit templates
775 to 818:
if ($display == 'edit')
{
$thelist .= "Id()."">";
$thelist .= $editImg;
$thelist .= "\n";
}
else
{
$thelist .= ' ' . "\n";
}
if(check_permission($userid, 'Modify Page Structure') || check_permission($userid, 'Remove Pages'))
{
if ($one->DefaultContent() != true)
{
//if ($one->ChildCount() == 0 && !in_array($one->Id(),$openedArray))
//var_dump($one->ChildCount());
if ($root->getChildrenCount() == 0) /*persmission check moved to top*/
{
$thelist .= "Id()."" onclick="if (confirm('".lang('deleteconfirm', $one->mName)."')) xajax_content_delete(".$one->Id()."); return false;">";
$thelist .= $deleteImg;
$thelist .= "\n";
}
else
{
$thelist .= ' ' . "\n";
}
}
else
{
$thelist .= ' ' . "\n";
}
}
if(check_permission($userid, 'Modify Page Structure'))
{
if ($one->DefaultContent() != true)
{
$thelist .= 'Id().'" />' . "\n";
}
else
{
$thelist .= ' ' . "\n";
}
}
956: if (check_permission($userid, 'Modify Page Structure')
|| check_permission($userid, 'Modify Any Page') )
added because in the td the check is the same
964: if (
check_modify_all($userid) && check_permission($userid, 'Modify Page Structure'))
deleted
974 $headoflist .= " \n";
change pageicon to pagepos (also possible to leave it and change the td to pageicon (pagepos has more space to left and right
977:
if (check_permission($userid, 'Modify Page Structure'))
{
$headoflist .= " \n";
}
There must be a permission check to delete pages in the header as well (was missing before)
A little modification of the javascript function so that deselect all is possible:
function selectall()
{
checkboxes = document.getElementsByTagName("input");
for (i=0; i<checkboxes.length ; i++)
{
if(checkboxes[ i ].type == "checkbox")
{
if(checkboxes[ i ].checked == false)
checkboxes[ i ].checked=true;
else
checkboxes[ i ].checked=false;
}
}
}