Changeset 687

Show
Ignore:
Timestamp:
11/04/06 16:14:35 (2 years ago)
Author:
sven
Message:

some htmlentities and php notices fixes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/_elggadmin/lib.php

    r686 r687  
    179179                             
    180180                            case "requiredstring": 
    181                             case "integer":     echo "<input type=\"text\" name=\"$name\" value=\"" . htmlentities($value) . "\" />"; 
     181                            case "integer":     echo "<input type=\"text\" name=\"$name\" value=\"" . htmlspecialchars($value) . "\" />"; 
    182182                                                break; 
    183183                            case "access": 
     
    206206                        } 
    207207                    } else { 
    208                         echo "<input type=\"text\" name=\"$name\" value=\"" . htmlentities($value) . "\" />"; 
     208                        echo "<input type=\"text\" name=\"$name\" value=\"" . htmlspecialchars($value) . "\" />"; 
    209209                    } 
    210210                     
     
    545545            <div id="navigation"><!-- start navigation --> 
    546546                <ul> 
    547                        <li><a href="index.php" {$current['config']}>Site configuration</a></li> 
    548                        <li><a href="theme.php" {$current['theme']}>Site theme</a></li> 
    549                        <li><a href="frontpage.php" {$current['frontpage']}>Front page</a></li> 
     547                    <li><a href="index.php" {$current['config']}>Site configuration</a></li> 
     548                    <li><a href="theme.php" {$current['theme']}>Site theme</a></li> 
     549                    <li><a href="frontpage.php" {$current['frontpage']}>Front page</a></li> 
    550550                    <!-- <li><a href="profile.php" {$current['profile']}>Profile fields</a></li> 
    551                        <li><a href="plugins.php" {$current['plugins']}>Plugins</a></li> --> 
     551                    <li><a href="plugins.php" {$current['plugins']}>Plugins</a></li> --> 
    552552                </ul> 
    553553            </div> 
  • devel/content/mainindex/content_loggedout.php

    r659 r687  
    3636if ($news = get_record_sql("SELECT wp.* FROM ".$CFG->prefix."weblog_posts wp 
    3737                            JOIN ".$CFG->prefix."users u ON u.ident = wp.weblog 
    38                             WHERE u.username = ? ORDER BY posted DESC LIMIT 1",array('news'),false)) { 
     38                            WHERE u.username = ? ORDER BY posted DESC",array('news'),false)) { 
    3939    $run_result .= "<div class=\"siteNews\">"; 
    4040    $run_result .= "<h2>" . __gettext("Latest news") . "</h2>"; 
  • devel/content/mainindex/content_main_index.php

    r659 r687  
    3737if ($news = get_record_sql("SELECT wp.* FROM ".$CFG->prefix."weblog_posts wp 
    3838                            JOIN ".$CFG->prefix."users u ON u.ident = wp.weblog 
    39                             WHERE u.username = ? ORDER BY posted DESC LIMIT 1",array('news'),false)) { 
     39                            WHERE u.username = ? ORDER BY posted DESC",array('news'),false)) { 
    4040    $run_result .= "<div class=\"sitenews\">"; 
    4141    $run_result .= "<h2>" . __gettext("Latest news") . "</h2>"; 
  • devel/content/mainindex/content_main_privacy.php

    r447 r687  
    11<?php 
     2global $CFG; 
    23 
    34    $sitename = sitename; 
  • devel/units/communities/userdetails_edit.php

    r659 r687  
    8282            'context' => 'databox', 
    8383            'name' => __gettext("Community owner"), 
    84             'column1' => "<input type=\"text\" name=\"community_owner\" value=\"" . htmlentities($owner_username) . "\" />" 
     84            'column1' => "<input type=\"text\" name=\"community_owner\" value=\"" . htmlspecialchars($owner_username) . "\" />" 
    8585            ) 
    8686            ); 
  • devel/units/groups/get_groups.php

    r269 r687  
    2222        $tempdata->ident = $group->ident; 
    2323        $tempdata->access = $group->access; 
    24         $members = get_records_sql("select gm.user_id, 
    25                                     u.name from ".$CFG->prefix."group_membership gm 
    26                                     join ".$CFG->prefix."users u on u.ident = gm.user_id 
    27                                     where gm.group_id = ?", array($tempdata->ident)); 
     24        $members = get_records_sql("SELECT gm.user_id, 
     25                                    u.name FROM ".$CFG->prefix."group_membership gm 
     26                                    JOIN ".$CFG->prefix."users u ON u.ident = gm.user_id 
     27                                    WHERE gm.group_id = ? ORDER BY u.name", array($tempdata->ident)); 
    2828        $tempdata->members = $members; 
    2929         
  • devel/units/magpie/function_subscriptions_publish_to_blog.php

    r667 r687  
    3939            if (run("permissions:check", "profile")) { 
    4040                $name .= "<br />"; 
    41                 $name .= __gettext("Keywords: ") . "<input type=\"text\" name=\"keywords[" . $feed->subid . "]\" value=\"" . htmlentities(stripslashes($feed->autopost_tag)) . "\" />"; 
     41                $name .= __gettext("Keywords: ") . "<input type=\"text\" name=\"keywords[" . $feed->subid . "]\" value=\"" . htmlspecialchars(stripslashes($feed->autopost_tag)) . "\" />"; 
    4242            } 
    4343            $column2 = "<a href=\"".url."_rss/individual.php?feed=".$feed->ident."\">". __gettext("View content") . "</a>"; 
  • devel/units/templates/templates_edit.php

    r659 r687  
    7474        } 
    7575         
    76         if ($current_template[$element['id']] == "" || !isset($current_template[$element['id']])) { 
     76        if (empty($current_template[$element['id']])) { 
    7777            $current_template[$element['id']] = $template[$element['id']]; 
    7878        } 
  • devel/units/weblogs/weblogs_posts_edit.php

    r659 r687  
    1111 
    1212if (!run("permissions:check", array("weblog:edit",$post->owner))) { 
    13     exit(); 
     13    exit(__gettext("Access Denied")); 
    1414} 
    1515