2009-01-17 00:52:50 +00:00
|
|
|
<?php defined("SYSPATH") or die("No direct script access.");
|
|
|
|
|
/**
|
|
|
|
|
* Gallery - a web based photo album viewer and editor
|
2010-03-03 10:15:34 -08:00
|
|
|
* Copyright (C) 2000-2010 Bharat Mediratta
|
2009-01-17 00:52:50 +00:00
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or (at
|
|
|
|
|
* your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
|
* General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
|
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
*/
|
|
|
|
|
class search_event_Core {
|
|
|
|
|
static function item_created($item) {
|
2009-05-20 06:10:14 +00:00
|
|
|
search::update($item);
|
2009-01-17 00:52:50 +00:00
|
|
|
}
|
|
|
|
|
|
2009-08-02 12:09:00 -07:00
|
|
|
static function item_updated($original, $new) {
|
|
|
|
|
search::update($new);
|
2009-01-17 00:52:50 +00:00
|
|
|
}
|
|
|
|
|
|
2009-07-16 11:19:34 -07:00
|
|
|
static function item_deleted($item) {
|
2010-01-09 23:57:16 -08:00
|
|
|
db::build()
|
|
|
|
|
->delete("search_records")
|
2009-11-26 12:09:04 -08:00
|
|
|
->where("item_id", "=", $item->id)
|
2010-01-09 23:57:16 -08:00
|
|
|
->execute();
|
2009-01-17 00:52:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static function item_related_update($item) {
|
2009-05-20 06:10:14 +00:00
|
|
|
search::update($item);
|
2009-01-17 00:52:50 +00:00
|
|
|
}
|
|
|
|
|
}
|