Changeset 468

Show
Ignore:
Timestamp:
07/22/06 16:21:36 (2 years ago)
Author:
sven
Message:

shut up a load of undefined constant warnings

Files:

Legend:

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

    r457 r468  
    474474                              'html' => "<li><a href=\"" . $CFG->wwwroot . "login/logout.php\">" . gettext("Log off") . "</a></li>"); 
    475475 
    476     if (context == "account") { 
     476    if (defined("context") && context == "account") { 
    477477        $PAGE->menu_sub[] = array( 
    478478                                  'name' => 'user:edit', 
     
    485485    } 
    486486 
    487     if (context == "admin" && logged_on && run("users:flags:get",array("admin", $_SESSION['userid']))) { 
     487    if (defined("context") && context == "admin" && logged_on && run("users:flags:get",array("admin", $_SESSION['userid']))) { 
    488488        $PAGE->menu_sub[] = array( 
    489489                                  'name' => 'admin', 
  • devel/mod/blog/lib.php

    r417 r468  
    1212    if (isloggedin()) { 
    1313 
    14         if (context == "weblog" && $page_owner == $_SESSION['userid']) { 
     14        if (defined("context") && context == "weblog" && $page_owner == $_SESSION['userid']) { 
    1515             
    1616            $PAGE->menu[] = array( 'name' => 'blog', 
     
    2626     
    2727    // submenu 
    28     if (context == "weblog") { 
     28    if (defined("context") && context == "weblog") { 
    2929         
    3030        if ($page_owner != -1) { 
  • devel/mod/community/lib.php

    r400 r468  
    1313    if ($usertype == "community") { 
    1414             
    15         if (context == "profile") { 
     15        if (defined("context") && context == "profile") { 
    1616             
    1717            $PAGE->menu_sub[] = array( 'name' => 'profile:edit',  
     
    3232             
    3333        } 
    34         if (context == "profile" || context == "network") { 
     34        if (defined("context") && (context == "profile" || context == "network")) { 
    3535            $PAGE->menu_sub[] = array( 'name' => 'community:requests', 
    3636                                           'html' => a_hrefg("{$CFG->wwwroot}_communities/requests.php?profile_id=$page_owner", 
     
    4545    } else if ($usertype == "person") { 
    4646     
    47         if (context == "network") { 
     47        if (defined("context") && context == "network") { 
    4848     
    4949            $PAGE->menu_sub[] = array( 'name' => 'community', 
  • devel/mod/file/lib.php

    r322 r468  
    1010 
    1111    if (isloggedin()) { 
    12         if (context == "files" && $page_owner == $_SESSION['userid']) { 
     12        if (defined("context") && context == "files" && $page_owner == $_SESSION['userid']) { 
    1313            $PAGE->menu[] = array( 'name' => 'file', 
    1414                                   'html' => "<li><a href=\"{$CFG->wwwroot}{$_SESSION['username']}/files/\" class=\"selected\" >" .gettext("Your Files").'</a></li>'); 
     
    1919    } 
    2020 
    21     if (context == "files") { 
     21    if (defined("context") && context == "files") { 
    2222         
    2323        $files_username = run("users:id_to_name",$page_owner); 
  • devel/mod/friend/lib.php

    r322 r468  
    1010 
    1111    if (isloggedin()) { 
    12         if (context == "network" && $page_owner == $_SESSION['userid']) { 
     12        if (defined("context") && context == "network" && $page_owner == $_SESSION['userid']) { 
    1313             
    1414            $PAGE->menu[] = array( 'name' => 'network', 
     
    2020    }         
    2121 
    22     if (context == "network") { 
     22    if (defined("context") && context == "network") { 
    2323         
    2424        if (run("users:type:get", $page_owner) == "person") { 
  • devel/mod/newsclient/lib.php

    r430 r468  
    1010 
    1111    if (isloggedin()) { 
    12         if (context == "resources" && $page_owner == $_SESSION['userid']) { 
     12        if (defined("context") && context == "resources" && $page_owner == $_SESSION['userid']) { 
    1313            $PAGE->menu[] = array( 'name' => 'resources', 
    1414                                   'html' => "<li><a href=\"{$CFG->wwwroot}{$_SESSION['username']}/feeds/\" class=\"selected\" >" .gettext("Your Resources").'</a></li>'); 
     
    2121    } 
    2222 
    23     if (context=="resources") { 
     23    if (defined("context") && context == "resources") { 
    2424     
    2525        if ($page_owner != -1) { 
  • devel/mod/profile/lib.php

    r466 r468  
    1212 
    1313    if (isloggedin()) { 
    14         if (context === "profile" && $pgowner == $_SESSION['userid']) {                 
     14        if (defined("context") && context == "profile" && $pgowner == $_SESSION['userid']) { 
    1515            $PAGE->menu[] = array( 'name' => 'profile:me',  
    1616                                   'html' => '<li><a href="'.$CFG->wwwroot.$_SESSION['username'].'" class="selected">'.gettext("Your Profile").'</a></li>'); 
     
    2020        } 
    2121 
    22         if (profile_permissions_check("profile") && context === "profile") { 
     22        if (profile_permissions_check("profile") && defined("context") && context == "profile") { 
    2323 
    2424            if (run("users:type:get", $pgowner) == "person") { 
  • devel/mod/template/lib.php

    r269 r468  
    99    $page_owner = $profile_id; 
    1010 
    11     if (context == "account") { 
     11    if (defined("context") && context == "account") { 
    1212        if ($page_owner == $_SESSION['userid'] && $page_owner != -1) { 
    1313            $PAGE->menu_sub[] = array( 'name' => 'template:change',