Make WordPress Core


Ignore:
Timestamp:
12/12/2008 08:47:18 PM (16 years ago)
Author:
ryan
Message:

Explicitly return ref for the sake of PHP4. Fixes user_level being empty when installing on PHP4. Props Mr Pete. fixes #8317 for trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/schema.php

    r10150 r10200  
    352352
    353353    // Add caps for Administrator role
    354     $role = get_role('administrator');
     354    $role =& get_role('administrator');
    355355    $role->add_cap('switch_themes');
    356356    $role->add_cap('edit_themes');
     
    385385
    386386    // Add caps for Editor role
    387     $role = get_role('editor');
     387    $role =& get_role('editor');
    388388    $role->add_cap('moderate_comments');
    389389    $role->add_cap('manage_categories');
     
    407407
    408408    // Add caps for Author role
    409     $role = get_role('author');
     409    $role =& get_role('author');
    410410    $role->add_cap('upload_files');
    411411    $role->add_cap('edit_posts');
     
    418418
    419419    // Add caps for Contributor role
    420     $role = get_role('contributor');
     420    $role =& get_role('contributor');
    421421    $role->add_cap('edit_posts');
    422422    $role->add_cap('read');
     
    425425
    426426    // Add caps for Subscriber role
    427     $role = get_role('subscriber');
     427    $role =& get_role('subscriber');
    428428    $role->add_cap('read');
    429429    $role->add_cap('level_0');
     
    438438    $roles = array('administrator', 'editor');
    439439    foreach ($roles as $role) {
    440         $role = get_role($role);
     440        $role =& get_role($role);
    441441        if ( empty($role) )
    442442            continue;
     
    459459    }
    460460
    461     $role = get_role('administrator');
     461    $role =& get_role('administrator');
    462462    if ( ! empty($role) ) {
    463463        $role->add_cap('delete_users');
     
    465465    }
    466466
    467     $role = get_role('author');
     467    $role =& get_role('author');
    468468    if ( ! empty($role) ) {
    469469        $role->add_cap('delete_posts');
     
    471471    }
    472472
    473     $role = get_role('contributor');
     473    $role =& get_role('contributor');
    474474    if ( ! empty($role) ) {
    475475        $role->add_cap('delete_posts');
     
    483483 */
    484484function populate_roles_230() {
    485     $role = get_role( 'administrator' );
     485    $role =& get_role( 'administrator' );
    486486
    487487    if ( !empty( $role ) ) {
     
    496496 */
    497497function populate_roles_250() {
    498     $role = get_role( 'administrator' );
     498    $role =& get_role( 'administrator' );
    499499
    500500    if ( !empty( $role ) ) {
     
    509509 */
    510510function populate_roles_260() {
    511     $role = get_role( 'administrator' );
     511    $role =& get_role( 'administrator' );
    512512
    513513    if ( !empty( $role ) ) {
     
    523523 */
    524524function populate_roles_270() {
    525     $role = get_role( 'administrator' );
     525    $role =& get_role( 'administrator' );
    526526
    527527    if ( !empty( $role ) ) {
Note: See TracChangeset for help on using the changeset viewer.