[campsite-support] Re: Unlock on Save&close
  • Edit the file admin-files/articles/do_edit.php and add the following code:

    $articleObj->setIsLocked(false);

    to the line 142.

    Mugur

    On Wed, Mar 31, 2010 at 7:22 PM, wrote:

    > Author: Terix
    > Link: http://code.campware.org/phorum/read.php?8,8290,8290#msg-8290
    >
    > --------------------------------------------------------------------------------
    >
    > Hi everybody,
    >
    > i need to add the article unlock to the "save & clsoe" button of the
    > article form.
    > Could anyone tell me where is the piece of code that is called by the
    > "save&close" button? I already know that i need to call "setIsLocked(false)"
    > to unlock articles.
    >
    > --
    > Sent from Campware Forums
    > http://code.campware.org/phorum
    >
  • 2 Comments sorted by
  • Hi Mugur,

    Thanks a lot for the reply, i've done this and it work flawlessy on my developing server, but it has issues on my production server (not unlocking as it should, articles keep locked for a random amount of time).
    Can give me any hint on where to check to pinpoint this problem? I'm checking Apache error log but i can't find anything related or useful. I can't find a way to check where exactly the unlock process goes wrong.
  • Hi Mugur,

    i've done this modification, but the articles don't get unlocked... i think it means that the unlocking fails in some way, what could be the reason? The articles get unlocked randomucaly, after some time (i can't find after how much)