# Must create /var/lib/codendi/plugins/mediawiki/master
# Done in /usr/share/gforge/plugins/mediawiki/cronjobs/create-wikis.php
# Theme
# ln -s /usr/share/codendi/plugins/mediawiki/mediawiki-skin/FusionForge.php /usr/share/mediawiki115/skins/
# ln -s /usr/share/codendi/plugins/mediawiki/mediawiki-skin/fusionforge /usr/share/mediawiki115/skins/
#
# create view group_plugin as (select service.service_id group_plugin_id,service.group_id,plugin.id plugin_id,service.short_name from service,plugin where service.short_name=plugin.name and service.is_active=1 and service.is_used=1 and service.group_id != 100);
# create view plugins as (select id plugin_id, name plugin_name, name plugin_desc from plugin );
#
# modify /etc/httpd/conf.d/codendi_aliases.conf to add plugin-mediawiki.inc
# add conf param in local.inc
#// Mediawiki
#$master_path = "/var/lib/codendi/plugins/mediawiki/master" ;
#$mwdata_path = "/var/lib/codendi/plugins/mediawiki";
#$mw_dbtype = "mysql";
#$projects_path = "/var/lib/codendi/plugins/mediawiki/projects";
#$config_path = "/etc/codendi";
#$src_path = "/usr/share/mediawiki115";
# call bin/create_links.sh

FFDIR=/usr/share/codendi
MWCRON=/usr/share/codendi/plugins/mediawiki/cronjobs
FFUSER=gforge

# You may need to change the pathname to php CLI (command line interface)
PHP="/usr/bin/php -q -d include_path=.:/etc/codendi:/usr/share/codendi/src:/usr/share/codendi/src/www/include:/usr/share/codendi/plugins"
PHP="/usr/bin/php -d include_path=.:/etc/codendi:/usr/share/codendi/src:/usr/share/codendi/src/www/include:/usr/share/codendi/plugins"

# Don't mail command output to anyone.
MAILTO=""

#
# Regular cron jobs for the plugin-mediawiki package
#

echo "Running $PHP $MWCRON/create-wikis.php"
$PHP $MWCRON/create-wikis-mysql.php

# Create new mediawikis four times an hour
#0,15,30,45 * * * * root [ -x $MWCRON/create-wikis.php ] && $PHP $MWCRON/create-wikis.php
#,16,31,46 * * * * root [ -x $MWCRON/create-imagedirs.php ] && $PHP $MWCRON/create-imagedirs.php

# Create wiki XML dumps every night
#5 1 * * * root [ -x $MWCRON/dump-wikis.php ] && $PHP $MWCRON/dump-wikis.php
