From 99e87e1869e49c67bea2b779283def0e98f39bca Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Mon, 14 Feb 2011 14:15:09 +0000 Subject: improved history --- .../Application/Controllers/BaseController.php | 2 +- .../Application/Controllers/LastController.php | 2 +- h-source/Application/Include/mediawiki.php | 29 ---------------------- h-source/Application/Models/HardwareModel.php | 2 +- 4 files changed, 3 insertions(+), 32 deletions(-) delete mode 100644 h-source/Application/Include/mediawiki.php (limited to 'h-source') diff --git a/h-source/Application/Controllers/BaseController.php b/h-source/Application/Controllers/BaseController.php index 7eb4236..7d03735 100644 --- a/h-source/Application/Controllers/BaseController.php +++ b/h-source/Application/Controllers/BaseController.php @@ -119,7 +119,7 @@ class BaseController extends Controller $data['lastModif'] = $this->m['HistoryModel'] ->select() - ->where(array('type'=>'wiki','gr'=>'registered')) + ->where(array('type'=>'hardware','gr'=>'registered')) ->orderBy('id_history desc') ->limit(5) ->send(); diff --git a/h-source/Application/Controllers/LastController.php b/h-source/Application/Controllers/LastController.php index 0791ccb..c357c1a 100644 --- a/h-source/Application/Controllers/LastController.php +++ b/h-source/Application/Controllers/LastController.php @@ -41,7 +41,7 @@ class LastController extends BaseController $whereClauseArray = array( 'gr' => 'registered', - 'type' => 'wiki', + 'type' => 'hardware', ); $this->helper('Pages','last/modifications/'.$this->lang,'page'); diff --git a/h-source/Application/Include/mediawiki.php b/h-source/Application/Include/mediawiki.php deleted file mode 100644 index 910ef9d..0000000 --- a/h-source/Application/Include/mediawiki.php +++ /dev/null @@ -1,29 +0,0 @@ -. - -if (!defined('EG')) die('Direct access not allowed!'); - - -define('SAME_DB','no'); - -define('MW_DB', 'mediawiki'); -define('MW_USER', 'root'); -define('MW_PWD', ''); -define('MW_HOST', 'localhost'); \ No newline at end of file diff --git a/h-source/Application/Models/HardwareModel.php b/h-source/Application/Models/HardwareModel.php index 150abc8..10f899e 100644 --- a/h-source/Application/Models/HardwareModel.php +++ b/h-source/Application/Models/HardwareModel.php @@ -226,7 +226,7 @@ class HardwareModel extends Model_Map { $history = new HistoryModel(); $history->values = array( 'created_by' => $this->id_user, - 'type' => 'wiki', + 'type' => 'hardware', 'action' => $action, 'id' => $this->lastId, 'message' => 'The device having id='.$this->lastId.' has been '.$translations[$action].' by the user ' . $clean['user'] . ' (id_user='.$this->id_user.') ', -- cgit v1.2.3