Changeset 499

Show
Ignore:
Timestamp:
08/13/06 19:14:05 (2 years ago)
Author:
misja
Message:

Changed use of a_hrefg to a_href and have the strings translated in function and not via intermediate function. Seems more logical and will ease gettext string extraction instead of using --keyword switch etc.

Files:

Legend:

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

    r468 r499  
    457457    if (isadmin()) { 
    458458    $PAGE->menu_top [] = array( 'name' => 'admin', 
    459                                 //'html' => a_hrefg("{$CFG->wwwroot}_admin/",  
     459                                //'html' => a_href("{$CFG->wwwroot}_admin/",  
    460460                                //                "Administration")); 
    461461                                'html' => "<li><a href=\"" . $CFG->wwwroot . "_admin/\">" . gettext("Administration") . "</a></li>"); 
     
    464464    $PAGE->menu_top[] = array( 
    465465                              'name' => 'userdetails', 
    466                               //'html' => a_hrefg("{$CFG->wwwroot}_userdetails/",  
     466                              //'html' => a_href("{$CFG->wwwroot}_userdetails/",  
    467467                              //                  "Account settings")); 
    468468                              'html' => "<li><a href=\"" . $CFG->wwwroot . "_userdetails/\">" . gettext("Account settings") . "</a></li>"); 
     
    470470    $PAGE->menu_top[] = array( 
    471471                              'name' => 'logoff', 
    472                               //'html' => a_hrefg("{$CFG->wwwroot}login/logout.php", 
     472                              //'html' => a_href("{$CFG->wwwroot}login/logout.php", 
    473473                              //                 "Log off")); 
    474474                              'html' => "<li><a href=\"" . $CFG->wwwroot . "login/logout.php\">" . gettext("Log off") . "</a></li>"); 
     
    477477        $PAGE->menu_sub[] = array( 
    478478                                  'name' => 'user:edit', 
    479                                   'html' => a_hrefg("{$CFG->wwwroot}_userdetails/", 
    480                                                    "Edit user details")); 
     479                                  'html' => a_href("{$CFG->wwwroot}_userdetails/", 
     480                                                   gettext("Edit user details"))); 
    481481        $PAGE->menu_sub[] = array( 
    482482                                  'name' => 'user:icon', 
    483                                   'html' => a_hrefg("{$CFG->wwwroot}_icons/", 
    484                                                    "Your site picture")); 
     483                                  'html' => a_href("{$CFG->wwwroot}_icons/", 
     484                                                   gettext("Your site picture"))); 
    485485    } 
    486486 
     
    488488        $PAGE->menu_sub[] = array( 
    489489                                  'name' => 'admin', 
    490                                   'html' => a_hrefg("{$CFG->wwwroot}_admin/", 
    491                                                    "Main")); 
     490                                  'html' => a_href("{$CFG->wwwroot}_admin/", 
     491                                                   gettext("Main"))); 
    492492    
    493493        $PAGE->menu_sub[] = array( 
    494494                                  'name' => 'admin:useradd', 
    495                                   'html' => a_hrefg("{$CFG->wwwroot}_admin/users_add.php", 
    496                                                    "Add users")); 
     495                                  'html' => a_href("{$CFG->wwwroot}_admin/users_add.php", 
     496                                                   gettext("Add users"))); 
    497497 
    498498        $PAGE->menu_sub[] = array( 
    499499                                  'name' => 'admin:users', 
    500                                   'html' => a_hrefg("{$CFG->wwwroot}_admin/users.php", 
    501                                                    "Manage users")); 
     500                                  'html' => a_href("{$CFG->wwwroot}_admin/users.php", 
     501                                                   gettext("Manage users"))); 
    502502 
    503503        $PAGE->menu_sub[] = array( 
    504504                                  'name' => 'admin:flaggedcontent', 
    505                                   'html' => a_hrefg("{$CFG->wwwroot}_admin/flags.php", 
    506                                                    "Manage flagged content")); 
     505                                  'html' => a_href("{$CFG->wwwroot}_admin/flags.php", 
     506                                                   gettext("Manage flagged content"))); 
    507507    
    508508        $PAGE->menu_sub[] = array( 
    509509                                  'name' => 'admin:spam', 
    510                                   'html' => a_hrefg("{$CFG->wwwroot}_admin/antispam.php", 
    511                                                    "Spam control")); 
     510                                  'html' => a_href("{$CFG->wwwroot}_admin/antispam.php", 
     511                                                   gettext("Spam control"))); 
    512512             
    513513    } 
  • devel/mod/community/lib.php

    r490 r499  
    2222             
    2323                $PAGE->menu_sub[] = array( 'name' => 'community:pic', 
    24                                            'html' => a_hrefg("{$CFG->wwwroot}_icons/?context=profile&amp;profile_id=$page_owner" , 
     24                                           'html' => a_href("{$CFG->wwwroot}_icons/?context=profile&amp;profile_id=$page_owner" , 
    2525                                                              gettext("Community site picture"))); 
    2626     
    2727                $PAGE->menu_sub[] = array( 'name' => 'community:edit', 
    28                                            'html' => a_hrefg("{$CFG->wwwroot}_userdetails/?context=profile&amp;profile_id=$page_owner" , 
     28                                           'html' => a_href("{$CFG->wwwroot}_userdetails/?context=profile&amp;profile_id=$page_owner" , 
    2929                                                             gettext("Edit community details"))); 
    3030 
     
    3434        if (defined("context") && (context == "profile" || context == "network")) { 
    3535            $PAGE->menu_sub[] = array( 'name' => 'community:requests', 
    36                                            'html' => a_hrefg("{$CFG->wwwroot}_communities/requests.php?profile_id=$page_owner", 
     36                                           'html' => a_href("{$CFG->wwwroot}_communities/requests.php?profile_id=$page_owner", 
    3737                                                             gettext("View membership requests"))); 
    3838        } 
    3939         
    4040        /*$PAGE->menu_sub[] = array( 'name' => 'community:members', 
    41                                    'html' => a_hrefg("{$CFG->wwwroot}_communities/members.php?owner=$page_owner" , 
     41                                   'html' => a_href("{$CFG->wwwroot}_communities/members.php?owner=$page_owner" , 
    4242                                                      gettext("Community Members")));*/ 
    4343                                                       
     
    4848     
    4949            $PAGE->menu_sub[] = array( 'name' => 'community', 
    50                                        'html' => a_hrefg("{$CFG->wwwroot}_communities/?owner=$page_owner" , 
     50                                       'html' => a_href("{$CFG->wwwroot}_communities/?owner=$page_owner" , 
    5151                                                          gettext("Communities")));  
    5252                             
    5353            $PAGE->menu_sub[] = array( 'name' => 'community:owned', 
    54                                        'html' => a_hrefg("{$CFG->wwwroot}_communities/owned.php?owner=$page_owner" , 
     54                                       'html' => a_href("{$CFG->wwwroot}_communities/owned.php?owner=$page_owner" , 
    5555                                                          gettext("Owned Communities"))); 
    5656 
  • devel/mod/file/lib.php

    r490 r499  
    2525        if ($page_owner == $_SESSION['userid'] && $page_owner != -1) { 
    2626            $PAGE->menu_sub[] = array( 'name' => 'file:add', 
    27                                        'html' => a_hrefg( "#addFile", 
    28                                                           gettext("Add a file or a folder")));             
     27                                       'html' => a_href( "#addFile", 
     28                                                          gettext("Add a file or a folder")));            
    2929        } 
    3030        if ($page_owner != -1) { 
    3131            if ($page_owner == $_SESSION['userid'] && $page_owner != -1) { 
    3232                $PAGE->menu_sub[] = array( 'name' => 'file:rss', 
    33                                            'html' => a_hrefg( $CFG->wwwroot.$_SESSION['username']."/files/rss/",  
     33                                           'html' => a_href( $CFG->wwwroot.$_SESSION['username']."/files/rss/",  
    3434                                                              gettext("RSS feed for files")));   
    3535            } 
    3636            if ($page_owner == $_SESSION['userid'] && $page_owner != -1) { 
    3737                $PAGE->menu_sub[] = array( 'name' => 'file:help', 
    38                                            'html' => a_hrefg( $CFG->wwwroot."help/files_help.php", 
     38                                           'html' => a_href( $CFG->wwwroot."help/files_help.php", 
    3939                                                              gettext("Page help")));   
    4040            } 
  • devel/mod/friend/lib.php

    r490 r499  
    2727             
    2828            $PAGE->menu_sub[] = array( 'name' => 'friend', 
    29                                        'html' => a_hrefg("{$CFG->wwwroot}{$friends_username}/friends/" , 
     29                                       'html' => a_href("{$CFG->wwwroot}{$friends_username}/friends/" , 
    3030                                                          gettext("Friends")));  
    3131             
    3232            $PAGE->menu_sub[] = array( 'name' => 'friend:of', 
    33                                        'html' => a_hrefg( "{$CFG->wwwroot}_friends/friendsof.php?owner=$page_owner", 
     33                                       'html' => a_href( "{$CFG->wwwroot}_friends/friendsof.php?owner=$page_owner", 
    3434                                                          gettext("Friend of")));  
    3535 
    3636            $PAGE->menu_sub[] = array( 'name' => 'friend:requests', 
    37                                        'html' => a_hrefg( "{$CFG->wwwroot}_friends/requests.php?owner=$page_owner", 
     37                                       'html' => a_href( "{$CFG->wwwroot}_friends/requests.php?owner=$page_owner", 
    3838                                                          gettext("Friendship requests"))); 
    3939             
    4040            $PAGE->menu_sub[] = array( 'name' => 'friend:foaf', 
    41                                        'html' => a_hrefg( "{$CFG->wwwroot}{$friends_username}/foaf/", 
     41                                       'html' => a_href( "{$CFG->wwwroot}{$friends_username}/foaf/", 
    4242                                                          gettext("FOAF")));  
    4343 
    4444            if (isloggedin()) { 
    4545                $PAGE->menu_sub[] = array( 'name' => 'friend:accesscontrols', 
    46                                            'html' => a_hrefg( "{$CFG->wwwroot}_groups/", 
     46                                           'html' => a_href( "{$CFG->wwwroot}_groups/", 
    4747                                                              gettext("Access controls"))); 
    4848 
    4949                if ($CFG->publicinvite == true) { 
    5050                    $PAGE->menu_sub[] = array( 'name' => 'friend:invite', 
    51                                                'html' => a_hrefg( "{$CFG->wwwroot}_invite/", 
     51                                               'html' => a_href( "{$CFG->wwwroot}_invite/", 
    5252                                                                  gettext("Invite a friend")));  
    5353                } 
    5454                 
    5555                $PAGE->menu_sub[] = array( 'name' => 'friend:help', 
    56                                            'html' => a_hrefg( "{$CFG->wwwroot}help/network_help.php", 
     56                                           'html' => a_href( "{$CFG->wwwroot}help/network_help.php", 
    5757                                                              gettext("Page help"))); 
    5858                 
  • devel/mod/newsclient/lib.php

    r468 r499  
    2626            if (run("permissions:check", "rss") && logged_on && $page_owner == $_SESSION['userid']) { 
    2727                $PAGE->menu_sub[] = array( 'name' => 'newsfeed:subscription', 
    28                                            'html' => a_hrefg( $CFG->wwwroot.$_SESSION['username']."/feeds/",  
     28                                           'html' => a_href( $CFG->wwwroot.$_SESSION['username']."/feeds/",  
    2929                                                              gettext("Feeds"))); 
    3030                $PAGE->menu_sub[] = array( 'name' => 'newsfeed:subscription:publish:blog', 
    31                                            'html' => a_hrefg( $CFG->wwwroot."_rss/blog.php?page_owner=" . $_SESSION['userid'],  
     31                                           'html' => a_href( $CFG->wwwroot."_rss/blog.php?page_owner=" . $_SESSION['userid'],  
    3232                                                              gettext("Publish to blog"))); 
    3333            } 
    3434            $PAGE->menu_sub[] = array( 'name' => 'newsclient', 
    35                                        'html' => a_hrefg( $CFG->wwwroot.$rss_username."/feeds/all/",  
     35                                       'html' => a_href( $CFG->wwwroot.$rss_username."/feeds/all/",  
    3636                                                          gettext("View aggregator"))); 
    3737        } 
    3838        $PAGE->menu_sub[] = array( 'name' => 'feed', 
    39                                    'html' => a_hrefg( $CFG->wwwroot."_rss/popular.php", 
     39                                   'html' => a_href( $CFG->wwwroot."_rss/popular.php", 
    4040                                                      gettext("Popular Feeds"))); 
    4141 
    4242        /* 
    4343        $PAGE->menu_sub[] = array( 'name' => 'feed', 
    44                                    'html' => a_hrefg( $CFG->wwwroot."help/feeds_help.php",  
     44                                   'html' => a_href( $CFG->wwwroot."help/feeds_help.php",  
    4545                                                      "Page help")); 
    4646        */ 
  • devel/mod/template/lib.php

    r490 r499  
    1212        if ($page_owner == $_SESSION['userid'] && $page_owner != -1) { 
    1313            $PAGE->menu_sub[] = array( 'name' => 'template:change', 
    14                                        'html' => a_hrefg( "{$CFG->wwwroot}_templates/", 
     14                                       'html' => a_href( "{$CFG->wwwroot}_templates/", 
    1515                                                          gettext("Change theme")));   
    1616        }