Menu

#2742 How to make update-safe changes (Area.php Room.php)?

open
nobody
None
1
2023-04-17
2023-04-17
Thomas S.
No

Hi

MRBS version: 1.10.0

I have made some changes to Area.php an Room.php (to be able to implement a per-ldap group role-based access to rooms in a specific area).

Is there a way to make this update-safe, because very time i update to the latest version, i have to merge my changes on the bottom of the files again?

Best,
Thomas

Discussion

  • Campbell Morrison

    Not very easily. The things you could do are

    1. Isolate your changes as much as possible by putting them in an include file.
    2. Take a fork of MRBS on GitHub and use the automatic merge tools. However you may still have to do a manual merge from time to time.
     
  • Thomas S.

    Thomas S. - 2023-04-17

    Hi

    Thanks. Is there any include file that is automatically included so i.e. "Room-local.php" or similar? Then i could have my changes in there and it is update-safe.

     
  • Campbell Morrison

    Ah, I've just realised, given the file names, that you must be using the roles branch. In which case you could just extend those classes. For example

    <?php
    namespace MRBS;
    
    class MyRoom extends Room
    {
    }
    

    But then you'd have to change Room to MyRoom throughout the rest of MRBS.

     
  • Thomas S.

    Thomas S. - 2023-04-17

    Ok this won't help either, but thanks a lot anyway :)

     
MongoDB Logo MongoDB