示例#1
0
 function spiderContent($item = null)
 {
     global $db;
     if (!defined('SYS_SEARCH')) {
         require_once BASE . 'subsystems/search.php';
     }
     $search = null;
     $search->category = 'Software Roadmap Entry';
     $search->ref_module = 'codemapmodule';
     $search->ref_type = 'codemap_stepstone';
     if ($item) {
         $db->delete('search', "ref_module='codemapmodule' AND ref_type='codemap_stepstone' AND original_id=" . $item->id);
         $search->original_id = $item->id;
         $search->title = ' ' . $item->name . ' ';
         $search->view_link = 'index.php?module=codemapmodule&action=stepstone_view&id=' . $item->id;
         $search->body = ' ' . pathos_search_removeHTML($item->description) . ' ';
         $search->location_data = $item->location_data;
         $db->insertObject($search, 'search');
     } else {
         $db->delete('search', "ref_module='codemapmodule' AND ref_type='codemap_stepstone'");
         foreach ($db->selectObjects('tasklist_task') as $item) {
             $search->original_id = $item->id;
             $search->title = ' ' . $item->name . ' ';
             $search->view_link = 'index.php?module=codemapmodule&action=stepstone_view&id=' . $item->id;
             $search->body = ' ' . pathos_search_removeHTML($item->description) . ' ';
             $search->location_data = $item->location_data;
             $db->insertObject($search, 'search');
         }
     }
     return true;
 }
示例#2
0
 function spiderContent($item = null)
 {
     global $db;
     if (!defined('SYS_SEARCH')) {
         require_once BASE . 'subsystems/search.php';
     }
     $search = null;
     $search->category = 'Links';
     $search->ref_module = 'linklistmodule';
     $search->ref_type = 'linklist_link';
     $search->view_link = '';
     if ($item) {
         $db->delete('search', "ref_module='linklistmodule' AND ref_type='linklist_link' AND original_id=" . $item->id);
         $search->original_id = $item->id;
         $search->title = ' ' . $item->name . ' ';
         $search->body = ' ' . pathos_search_removeHTML($item->description) . ' ';
         $search->location_data = $item->location_data;
         $db->insertObject($search, 'search');
     } else {
         $db->delete('search', "ref_module='linklistmodule' AND ref_type='linklist_link'");
         foreach ($db->selectObjects('linklist_link') as $item) {
             $search->original_id = $item->id;
             $search->title = ' ' . $item->name . ' ';
             $search->body = ' ' . pathos_search_removeHTML($item->description) . ' ';
             $search->location_data = $item->location_data;
             $db->insertObject($search, 'search');
         }
     }
     return true;
 }
示例#3
0
 function spiderContent($item = null)
 {
     global $db;
     if (!defined('SYS_SEARCH')) {
         require_once BASE . 'subsystems/search.php';
     }
     $search = null;
     $search->ref_module = 'bbmodule';
     if ($item) {
         $search->original_id = $item->id;
         if (isset($item->board_id)) {
             // Forum post
             $search->category = 'Bulletin Board Post';
             $search->ref_type = 'bb_post';
             $db->delete('search', "ref_module='bbmodule' AND ref_type='bb_post' AND original_id=" . $item->id);
             $search->title = ' ' . $item->subject . ' ';
             $search->body = ' ' . pathos_search_removeHTML($item->body) . ' ';
             $search->view_link = 'index.php?module=bbmodule&action=view_thread&id=' . $item->id;
             $board = $db->selectObject('bb_board', 'id=' . $item->board_id);
             $search->location_data = $board->location_data;
         } else {
             // Forum
             $search->category = 'Bulletin Board';
             $search->ref_type = 'bb_board';
             $db->delete('search', "ref_module='bbmodule' AND ref_type='bb_board' AND original_id=" . $item->id);
             $search->title = " " . $item->name . " ";
             $search->body = " " . pathos_search_removeHTML($item->description) . " ";
             $search->location_data = $item->location_data;
             $search->view_link = 'index.php?module=bbmodule&action=view_board&id=' . $item->id;
         }
         $db->insertObject($search, "search");
     } else {
         $db->delete('search', "ref_module='bbmodule' AND ref_type='bb_post'");
         $db->delete('search', "ref_module='bbmodule' AND ref_type='bb_board'");
         $search->category = 'Bulletin Board';
         $search->ref_type = 'bb_board';
         $boards = $db->selectObjectsIndexedArray('bb_board');
         foreach ($boards as $item) {
             $search->original_id = $item->id;
             $search->title = ' ' . $item->name . ' ';
             $search->body = ' ' . pathos_search_removeHTML($item->description) . ' ';
             $search->location_data = $item->location_data;
             $search->view_link = 'index.php?module=bbmodule&action=view_board&id=' . $item->id;
             $db->insertObject($search, 'search');
         }
         $search->category = 'Bulletin Board';
         $search->ref_type = 'bb_board';
         foreach ($db->selectObjects('bb_post') as $post) {
             $search->original_id = $item->id;
             $search->title = ' ' . $item->subject . ' ';
             $search->body = ' ' . pathos_search_removeHTML($item->body) . ' ';
             $search->location_data = $boards[$item->board_id]->location_data;
             $search->view_link = 'index.php?module=bbmodule&action=view_thread&id=' . $post->id;
             $db->insertObject($search, 'search');
         }
     }
     return true;
 }
示例#4
0
 function spiderContent($item = null)
 {
     global $db;
     if (!defined("SYS_SEARCH")) {
         require_once BASE . "subsystems/search.php";
     }
     $search = null;
     $search->category = 'Events';
     $search->view_link = '';
     // FIXME : need a view action
     $search->ref_module = 'calendarmodule';
     $search->ref_type = 'calendar';
     if ($item) {
         $db->delete("search", "ref_module='calendarmodule' AND ref_type='calendar' AND original_id=" . $item->id);
         $search->original_id = $item->id;
         $search->body = " " . pathos_search_removeHTML($item->body) . " ";
         $search->title = " " . $item->title . " ";
         $search->location_data = $item->location_data;
         $db->insertObject($search, "search");
     } else {
         $db->delete("search", "ref_module='calendarmodule' AND ref_type='calendar'");
         foreach ($db->selectObjects("calendar") as $item) {
             $search->original_id = $item->id;
             $search->body = " " . pathos_search_removeHTML($item->body) . " ";
             $search->title = " " . $item->title . " ";
             $search->location_data = $item->location_data;
             $db->insertObject($search, "search");
         }
     }
     return true;
 }
示例#5
0
 function spiderContent($item = null)
 {
     pathos_lang_loadDictionary('modules', 'resourcesmodule');
     global $db;
     if (!defined('SYS_SEARCH')) {
         require_once BASE . 'subsystems/search.php';
     }
     $search = null;
     $search->category = TR_RESOURCESMODULE_SEARCHTYPE;
     $search->view_link = '';
     // FIXME: need a view action
     $search->ref_module = 'resourcesmodule';
     $search->ref_type = 'resourceitem';
     if ($item) {
         $db->delete('search', "ref_module='resourcesmodule' AND ref_type='resourceitem' AND original_id=" . $item->id);
         $search->original_id = $item->id;
         $search->body = ' ' . pathos_search_removeHTML($item->description) . ' ';
         $search->title = ' ' . $item->name . ' ';
         $search->location_data = $item->location_data;
         $db->insertObject($search, 'search');
     } else {
         $db->delete('search', "ref_module='resourcesmodule' AND ref_type='resourceitem'");
         foreach ($db->selectObjects('resourceitem') as $item) {
             $search->original_id = $item->id;
             $search->body = ' ' . pathos_search_removeHTML($item->description) . ' ';
             $search->title = ' ' . $item->name . ' ';
             $search->location_data = $item->location_data;
             $db->insertObject($search, 'search');
         }
     }
     return true;
 }
示例#6
0
 function spiderContent($item = null)
 {
     global $db;
     if (!defined('SYS_SEARCH')) {
         require_once BASE . 'subsystems/search.php';
     }
     pathos_lang_loadDictionary('modules', 'weblogmodule');
     $search = null;
     $search->category = TR_WEBLOGMODULE_SEARCHTYPE;
     $search->view_link = "";
     // FIXME : need a view action
     $search->ref_module = 'weblogmodule';
     $search->ref_type = 'weblog_post';
     $view_link = array('module' => 'weblogmodule', 'action' => 'view', 'id' => 0);
     if ($item && $item->is_draft == 0) {
         $db->delete('search', "ref_module='weblogmodule' AND ref_type='weblog_post' AND original_id=" . $item->id);
         $search->original_id = $item->id;
         $search->body = " " . pathos_search_removeHTML($item->body) . " ";
         $search->title = " " . $item->title . " ";
         $search->location_data = $item->location_data;
         $view_link['id'] = $item->id;
         $search->view_link = pathos_core_makeLink($view_link, true);
         $db->insertObject($search, 'search');
     } else {
         $db->delete('search', "ref_module='weblogmodule' AND ref_type='weblog_post'");
         foreach ($db->selectObjects('weblog_post', 'is_private=0 AND is_draft=0') as $item) {
             $search->original_id = $item->id;
             $search->body = ' ' . pathos_search_removeHTML($item->body) . ' ';
             $search->title = ' ' . $item->title . ' ';
             $search->location_data = $item->location_data;
             $view_link['id'] = $item->id;
             $search->view_link = pathos_core_makeLink($view_link, true);
             $db->insertObject($search, 'search');
         }
     }
     return true;
 }
示例#7
0
 function spiderContent($item = null)
 {
     global $db;
     if (!defined("SYS_SEARCH")) {
         require_once BASE . "subsystems/search.php";
     }
     $search = null;
     $search->category = "News";
     $search->ref_module = "newsmodule";
     $search->ref_type = "newsitem";
     if ($item) {
         $db->delete("search", "ref_module='newsmodule' AND ref_type='newsitem' AND original_id=" . $item->id);
         $search->original_id = $item->id;
         $search->title = " " . $item->title . " ";
         $search->view_link = "index.php?module=newsmodule&action=view&id=" . $item->id;
         $search->body = " " . pathos_search_removeHTML($item->body) . " ";
         $search->location_data = $item->location_data;
         $db->insertObject($search, "search");
     } else {
         $db->delete("search", "ref_module='newsmodule' AND ref_type='newsitem'");
         foreach ($db->selectObjects("newsitem") as $item) {
             $search->original_id = $item->id;
             $search->title = " " . $item->title . " ";
             $search->view_link = "index.php?module=newsmodule&action=view&id=" . $item->id;
             $search->body = " " . pathos_search_removeHTML($item->body) . " ";
             $search->location_data = $item->location_data;
             $db->insertObject($search, "search");
         }
     }
     return true;
 }
示例#8
0
 function spiderContent($item = null)
 {
     global $db;
     pathos_lang_loadDictionary('modules', 'textmodule');
     if (!defined('SYS_SEARCH')) {
         require_once BASE . 'subsystems/search.php';
     }
     $search = null;
     $search->title = '';
     $search->view_link = '';
     $search->category = TR_TEXTMODULE_SEARCHTYPE;
     $search->ref_module = 'textmodule';
     $search->ref_type = 'textitem';
     if ($item) {
         $db->delete("search", "ref_module='textmodule' AND ref_type='textitem' AND original_id=" . $item->id);
         $search->original_id = $item->id;
         $search->body = " " . pathos_search_removeHTML($item->text) . " ";
         $search->location_data = $item->location_data;
         $db->insertObject($search, "search");
     } else {
         $db->delete("search", "ref_module='textmodule' AND ref_type='textitem'");
         foreach ($db->selectObjects("textitem") as $item) {
             $search->original_id = $item->id;
             $search->body = " " . pathos_search_removeHTML($item->text) . " ";
             $search->location_data = $item->location_data;
             $db->insertObject($search, "search");
         }
     }
     return true;
 }
示例#9
0
 function spiderContent($item = null)
 {
     global $db;
     if (!defined('SYS_SEARCH')) {
         require_once BASE . 'subsystems/search.php';
     }
     $search = null;
     $search->category = 'Frequently Asked Questions';
     $search->ref_module = 'faqmodule';
     $search->ref_type = 'faq';
     $search->view_link = '';
     // This is fine, since we are guaranteed to be able to view the FAQ from the section.
     if ($item) {
         $db->delete('search', "ref_module='faqmodule' AND ref_type='faq' AND original_id=" . $item->id);
         $search->original_id = $item->id;
         $search->title = ' ' . $item->question . ' ';
         $search->body = ' ' . pathos_search_removeHTML($item->answer) . ' ';
         $search->location_data = $item->location_data;
         $db->insertObject($search, 'search');
     } else {
         $db->delete('search', "ref_module='articlemodule' AND ref_type='article'");
         foreach ($db->selectObjects('faq') as $item) {
             $search->original_id = $item->id;
             $search->title = ' ' . $item->question . ' ';
             $search->body = ' ' . pathos_search_removeHTML($item->answer) . ' ';
             $search->location_data = $item->location_data;
             $db->insertObject($search, 'search');
         }
     }
     return true;
 }