New Listcontent.php: List of Pages not correctly displayed: fixed

A place to discuss the testing process in beta cycles or against SVN for the CMS Made Simple CORE package.
Locked
SimonSchaufi

New Listcontent.php: List of Pages not correctly displayed: fixed

Post by SimonSchaufi »

There are a lot of displaying bugs in listcontent.php which i fixed now by myself. this took me some hours. i tested it with different combinations of permissions.

here is the new 1.1.4.1 version

i will post later what i changed
Attachments

[The extension txt has been deactivated and can no longer be displayed.]

Last edited by SimonSchaufi on Tue Oct 23, 2007 5:55 pm, edited 1 time in total.
SimonSchaufi

Re: Table List of Pages not correctly displayed: fixed by myself

Post by SimonSchaufi »

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;

}
}
}
Last edited by SimonSchaufi on Mon Oct 22, 2007 10:57 am, edited 1 time in total.
Locked

Return to “[locked] Quality Assurance”