Trick for turning on auto-APPROVED reporting in ushahidi


I know a LOT of people have been asking for a trick to make the default setting in ushahidi be that all reports appear on the public website WITHOUT requiring prior approval. My buddy wrote a script (about 3 lines) that WORKS (we think, but then again nobody is submitting reports.).

What it does is check every 30 minutes (using a cron job on bluehost) whether the database contains any reports that are less than 30 minutes old that have not been approved. If so, it updates the status to say approved. And viola! New reports appear. This also allows you to un-approve a report without deleting it after it is 30 minutes old, and the cron job hack won't interfere.

Not a bad use of 3 lines of code. Here is the script:



mysql -D globamh1_kamukunji -u [your_db_username] --password=********** -e 'update

incident set incident_active=1 where incident_active=0 and timediff(now(), incident_dateadd) < time("00:30:00")'


You will need to tailor it to your instance. Here is what the parts mean:

globalmh1_makukunji = change to the name of your database

[your_db_username] = change to the username that had write access to the database for ushahidi

This script worked on bluehost. has a cron job scheduler on the control panel.

BTW - it seemed to work when we tested it, but I haven't seen what else this might do to ushahidi over the long run. Use at your own risk.


Or simply jump to applicationcontrollersreports.php, go to around line 367 where it says:


Go up 3 lines, and change:

$incident->save(); // There are 2 of these - Dont just search


$incident->incident_active = 1;



- Reelix


The platform has had this ability for quite some time without a code hack. Please follow the instructions here to auto approve reports.


We went into the Admin section of Ushahidi as you directed for this built in option and when we follow those directions this is what we get as a error;

Parse error: syntax error, unexpected T_FUNCTION in /home/tpu/public_html/ushahidi/application/views/admin/manage/actions/main.php on line 297