Turning off the locks on objects in Joomla

Continuing the theme of anti-blocking objects Joomla want to propose another solution: disable the locking mechanism of the objects during editing. Just want to warn that this decision applies only to sites with a small number of administrators (1-2), ie where the probability of simultaneous editing of the material (or any other object) is very small.

On the technical side of the proposed method is based on the fact that in Joomla to represent database objects used by the heirs of the base class mosDBTable, and which contains methods for blocking (checkout) and unlock (checkin) objects. Therefore, if this base class to disable the logic of these functions, the lock facilities will NOT work (well, except when the developers of third-party extensions using its own implementation of these methods, which is extremely rare).

Before the beginning of modifications recommended to backup changed files. If you have something suddenly not be able to have a backup copy will allow you to undo changes and restore your site.

  1. Open the file / Includes / database.php
  2. We find in him a line
      function checkout( $ User_id, $ Oid=null ) {
  3. and replace it with

      function checkout( $ User_id, $ Oid=null ) {
        return true;
  4. We find in him a line
      function checkin( $ Oid=null ) {
  5. and replace it with

      function checkin( $ Oid=null ) {
        return true;
  6. Save the changes to the file

That’s actually saying it. You just have to choose which of the methods to combat locks on objects to use (and whether you want to fight them at all).

Comments are closed.