On Thu, 2003-01-16 at 12:42, Stephan Elsner wrote:
> Hello,
Greetings!
> in our current project only articles with approved > revised are being
> displayed.
> When a user edits and saves the article, no new dataset will be created,
> Aegir just changes the existing one.
> In this case revised is > approved and the article disappears from the
> website. Is there a way to tell Aegir to insert a new revision and leaves
> the old article untouched?
Typically the staging/live concept is used here.
In staging/live you have two Midgard databases, either running on
same system or on separate computers.
One of the databases is called staging, and that is where content
is created and tested.
When content is approved it is then replicated to the live database.
This replication process is handled with Repligard. Unfortunately
Repligard itself doesn't know anything about checking approvals,
so some 3rd party scripts are needed.
The aegir-dirs package provides these scripts for you:
downgrade_unapproved.pl
This script is called by the staging_to_live script. It
goes through the Midgard database and determines which objects
are approved and which are not. It then modifies the repligard
table in the database, setting the "updated" field to NULL for
each unapproved object. Because updated is marked as NULL repligard
should not include these objects to the replication run.
repligard_staging_to_live.sh
This script runs the required commands for transferring
content from staging database to live database. The commands
are:
* Downgrade "updated" fields for unapproved content
* Export updated objects from staging database
* Import the exported file to live database
Note that these scripts assume that they're located in
/var/nadmin/bin, and that they have the required configuration
files (also from aegir-dirs package) in /var/nadmin/etc.
To make this replication process automatic, you should add
the repligard_staging_to_live.sh command to cron. Typical
way to run it is hourly.
I addition, Aegir has the "Publish" button in main navigation.
If you want this button to initiate almost-instanteous replication,
you can add the following command to be run every minute from
cron:
if [ -r "/tmp/runreplication" ]
then
/var/nadmin/bin/repligard_staging_to_live.sh > /dev/null
rm /tmp/runreplication
fi
> Stephan Elsner
/Bergie
--
Henri Bergius [EMAIL PROTECTED]
Consultant Partner Tel: +358-20-198 6032
Nemein Oy http://www.nemein.com/
Nemein Oy has moved. Our new address is Nemein Oy, Innopoli 2,
Tekniikantie 14, FIN-02150 Espoo
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]