Applying a patch

From FUDforum Wiki
Jump to: navigation, search

A patch describes code changes that can either be applied or removed from a system containing a version of the source code. All large software projects, including FUDforum, use patches to move from one software version to the next.

To apply a patch manually, remove lines starting with a minus (-) and add lines starting with a plus (+) to get to the new version. The below procedure can be used to install patches automatically.

Contents

Applying patches

Steps to apply a FUDforum patch on your system (handy if you cannot wait for the next release or if you want to test a patch on your system to ensure it will work once the final release is made available):

  • Identify the patch you want to install from FUDforum's SVN repository. Click on the "Patchset" link to download it to one of the following directories.
    • Patches against Server_Root should go into your www_root/ directory ($WWW_ROOT_DISK)
    • Patches against Forum_Data_Root should go into your forum_data/ directory ($DATA_DIR)
  • Change to the directory where the patch is located:
cd forum_data/

or

cd www_root/
  • Use the patch command to apply the patch to your installation:
patch -p2 <FUDforum_patchset_11869.diff
  • If you apply changes to files containing SQL definitions, you also need to run them against your database. Note that any occurrences of {SQL_TABLE_PREFIX} needs to be expanded to your forum's setting (look in your GLOBALS.php file). For example, MySQL users may run the SQL from phpMyAdmin or command line:
mysql -ufudforum -pmypassword fuddb
mysql> CREATE INDEX fud28_users_i_jd ON fud28_users (join_date);
Query OK, 2 rows affected (0.05 sec)
Records: 2  Duplicates: 0  Warnings: 0

Removing patches

If a patch breaks your forum, and you want to uninstall it, run the patch command with the -R option:

patch -R -p2 <FUDforum_patchset_11869.diff 

Remember to rebuild your themes when done.

Also see

External links

Languages
Personal tools
This is a cached copy of the requested page, and may not be up to date.

Sorry! This site is experiencing technical difficulties.
Try waiting a few minutes and reloading.

(Can't contact the database server: Cannot return last error, no db connection)


You can try searching via Google in the meantime.
Note that their indexes of our content may be out of date.