Skip to content

Commit

Permalink
MDL-55278 search: Updating references to area namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
David Monllao committed Jul 21, 2016
1 parent 8fa1810 commit 0bd8383
Show file tree
Hide file tree
Showing 34 changed files with 44 additions and 44 deletions.
2 changes: 1 addition & 1 deletion course/classes/search/mycourse.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* @copyright 2016 Skylar Kelty <S.Kelty@kent.ac.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class mycourse extends \core_search\area\base {
class mycourse extends \core_search\base {

/**
* The context levels the search implementation is working on.
Expand Down
2 changes: 1 addition & 1 deletion mod/assign/classes/search/activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* @copyright 2015 David Monllao {@link http://www.davidmonllao.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class activity extends \core_search\area\base_activity {
class activity extends \core_search\base_activity {
/**
* Returns true if this area uses file indexing.
*
Expand Down
2 changes: 1 addition & 1 deletion mod/book/classes/search/activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
* @copyright 2015 David Monllao {@link http://www.davidmonllao.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class activity extends \core_search\area\base_activity {
class activity extends \core_search\base_activity {
}
2 changes: 1 addition & 1 deletion mod/book/classes/search/chapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* @copyright 2016 Eric Merrill {@link http://www.merrilldigital.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class chapter extends \core_search\area\base_mod {
class chapter extends \core_search\base_mod {
/**
* @var array Cache of book records.
*/
Expand Down
2 changes: 1 addition & 1 deletion mod/chat/classes/search/activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
* @copyright 2015 David Monllao {@link http://www.davidmonllao.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class activity extends \core_search\area\base_activity {
class activity extends \core_search\base_activity {
}
2 changes: 1 addition & 1 deletion mod/choice/classes/search/activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
* @copyright 2015 David Monllao {@link http://www.davidmonllao.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class activity extends \core_search\area\base_activity {
class activity extends \core_search\base_activity {
}
2 changes: 1 addition & 1 deletion mod/data/classes/search/activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
* @copyright 2016 David Monllao {@link http://www.davidmonllao.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class activity extends \core_search\area\base_activity {
class activity extends \core_search\base_activity {
}
2 changes: 1 addition & 1 deletion mod/feedback/classes/search/activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
* @copyright 2015 David Monllao {@link http://www.davidmonllao.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class activity extends \core_search\area\base_activity {
class activity extends \core_search\base_activity {
}
2 changes: 1 addition & 1 deletion mod/folder/classes/search/activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* @copyright 2015 David Monllao {@link http://www.davidmonllao.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class activity extends \core_search\area\base_activity {
class activity extends \core_search\base_activity {
/**
* Returns true if this area uses file indexing.
*
Expand Down
2 changes: 1 addition & 1 deletion mod/forum/classes/search/activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
* @copyright 2015 David Monllao {@link http://www.davidmonllao.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class activity extends \core_search\area\base_activity {
class activity extends \core_search\base_activity {
}
2 changes: 1 addition & 1 deletion mod/forum/classes/search/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* @copyright 2015 David Monllao {@link http://www.davidmonllao.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class post extends \core_search\area\base_mod {
class post extends \core_search\base_mod {

/**
* @var array Internal quick static cache.
Expand Down
2 changes: 1 addition & 1 deletion mod/glossary/classes/search/activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
* @copyright 2015 David Monllao {@link http://www.davidmonllao.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class activity extends \core_search\area\base_activity {
class activity extends \core_search\base_activity {
}
2 changes: 1 addition & 1 deletion mod/glossary/classes/search/entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* @copyright 2015 David Monllao {@link http://www.davidmonllao.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class entry extends \core_search\area\base_mod {
class entry extends \core_search\base_mod {

/**
* @var array Internal quick static cache.
Expand Down
2 changes: 1 addition & 1 deletion mod/imscp/classes/search/activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
* @copyright 2015 David Monllao {@link http://www.davidmonllao.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class activity extends \core_search\area\base_activity {
class activity extends \core_search\base_activity {
}
2 changes: 1 addition & 1 deletion mod/label/classes/search/activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* @copyright 2015 David Monllao {@link http://www.davidmonllao.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class activity extends \core_search\area\base_activity {
class activity extends \core_search\base_activity {

/**
* Overwritten as labels are displayed in-course.
Expand Down
2 changes: 1 addition & 1 deletion mod/lesson/classes/search/activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
* @copyright 2015 David Monllao {@link http://www.davidmonllao.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class activity extends \core_search\area\base_activity {
class activity extends \core_search\base_activity {
}
2 changes: 1 addition & 1 deletion mod/lti/classes/search/activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
* @copyright 2015 David Monllao {@link http://www.davidmonllao.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class activity extends \core_search\area\base_activity {
class activity extends \core_search\base_activity {
}
2 changes: 1 addition & 1 deletion mod/page/classes/search/activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* @copyright 2015 David Monllao {@link http://www.davidmonllao.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class activity extends \core_search\area\base_activity {
class activity extends \core_search\base_activity {


/**
Expand Down
2 changes: 1 addition & 1 deletion mod/quiz/classes/search/activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
* @copyright 2015 David Monllao {@link http://www.davidmonllao.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class activity extends \core_search\area\base_activity {
class activity extends \core_search\base_activity {
}
2 changes: 1 addition & 1 deletion mod/resource/classes/search/activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* @copyright 2015 David Monllao {@link http://www.davidmonllao.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class activity extends \core_search\area\base_activity {
class activity extends \core_search\base_activity {
/**
* Returns true if this area uses file indexing.
*
Expand Down
2 changes: 1 addition & 1 deletion mod/scorm/classes/search/activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
* @copyright 2015 David Monllao {@link http://www.davidmonllao.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class activity extends \core_search\area\base_activity {
class activity extends \core_search\base_activity {
}
2 changes: 1 addition & 1 deletion mod/survey/classes/search/activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* @copyright 2015 David Monllao {@link http://www.davidmonllao.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class activity extends \core_search\area\base_activity {
class activity extends \core_search\base_activity {

/**
* Returns recordset containing required data for indexing activities.
Expand Down
2 changes: 1 addition & 1 deletion mod/url/classes/search/activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* @copyright 2016 Dan Poltawski
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class activity extends \core_search\area\base_activity {
class activity extends \core_search\base_activity {

/**
* Returns the document associated with this activity.
Expand Down
2 changes: 1 addition & 1 deletion mod/wiki/classes/search/activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
* @copyright 2015 David Monllao {@link http://www.davidmonllao.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class activity extends \core_search\area\base_activity {
class activity extends \core_search\base_activity {
}
2 changes: 1 addition & 1 deletion mod/wiki/classes/search/collaborative_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* @copyright 2016 Eric Merrill {@link http://www.merrilldigital.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class collaborative_page extends \core_search\area\base_mod {
class collaborative_page extends \core_search\base_mod {
/**
* @var array Cache of wiki records.
*/
Expand Down
2 changes: 1 addition & 1 deletion mod/workshop/classes/search/activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
* @copyright 2015 David Monllao {@link http://www.davidmonllao.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class activity extends \core_search\area\base_activity {
class activity extends \core_search\base_activity {
}
10 changes: 5 additions & 5 deletions search/classes/engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public function get_user($userid) {
* Returns a search instance of the specified area checking internal caching.
*
* @param string $areaid Area id
* @return \core_search\area\base
* @return \core_search\base
*/
protected function get_search_area($areaid) {

Expand Down Expand Up @@ -174,11 +174,11 @@ protected function get_search_area($areaid) {
/**
* Returns a document instance prepared to be rendered.
*
* @param \core_search\area\base $searcharea
* @param \core_search\base $searcharea
* @param array $docdata
* @return \core_search\document
*/
protected function to_document(\core_search\area\base $searcharea, $docdata) {
protected function to_document(\core_search\base $searcharea, $docdata) {

list($componentname, $areaname) = \core_search\manager::extract_areaid_parts($docdata['areaid']);
$doc = \core_search\document_factory::instance($docdata['itemid'], $componentname, $areaname, $this);
Expand Down Expand Up @@ -255,7 +255,7 @@ public function index_complete($numdocs = 0, $fullindex = false) {
/**
* Do anything that may need to be done before an area is indexed.
*
* @param \core_search\area\base $searcharea The search area that was complete
* @param \core_search\base $searcharea The search area that was complete
* @param bool $fullindex True if a full index is being performed
* @return void
*/
Expand All @@ -268,7 +268,7 @@ public function area_index_starting($searcharea, $fullindex = false) {
*
* Return false to prevent the search area completed time and stats from being updated.
*
* @param \core_search\area\base $searcharea The search area that was complete
* @param \core_search\base $searcharea The search area that was complete
* @param int $numdocs The number of documents that were added to the index
* @param bool $fullindex True if a full index is being performed
* @return bool True means that data is considered indexed
Expand Down
12 changes: 6 additions & 6 deletions search/classes/manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ class manager {
const NO_OWNER_ID = 0;

/**
* @var \core_search\area\base[] Enabled search areas.
* @var \core_search\base[] Enabled search areas.
*/
protected static $enabledsearchareas = null;

/**
* @var \core_search\area\base[] All system search areas.
* @var \core_search\base[] All system search areas.
*/
protected static $allsearchareas = null;

Expand All @@ -100,7 +100,7 @@ class manager {
/**
* Constructor, use \core_search\manager::instance instead to get a class instance.
*
* @param \core_search\area\base The search engine to use
* @param \core_search\base The search engine to use
*/
public function __construct($engine) {
$this->engine = $engine;
Expand Down Expand Up @@ -190,7 +190,7 @@ protected static function get_area_classname($areaid) {
* Returns a new area search indexer instance.
*
* @param string $areaid
* @return \core_search\area\base|bool False if the area is not available.
* @return \core_search\base|bool False if the area is not available.
*/
public static function get_search_area($areaid) {

Expand All @@ -214,7 +214,7 @@ public static function get_search_area($areaid) {
* Return the list of available search areas.
*
* @param bool $enabled Return only the enabled ones.
* @return \core_search\area\base[]
* @return \core_search\base[]
*/
public static function get_search_areas_list($enabled = false) {

Expand Down Expand Up @@ -677,7 +677,7 @@ public function delete_index_by_id($id) {
/**
* Returns search areas configuration.
*
* @param \core_search\area\base[] $searchareas
* @param \core_search\base[] $searchareas
* @return \stdClass[] $configsettings
*/
public function get_areas_config($searchareas) {
Expand Down
2 changes: 1 addition & 1 deletion search/engine/solr/classes/engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ protected function commit() {
*
* Return false to prevent the search area completed time and stats from being updated.
*
* @param \core_search\area\base $searcharea The search area that was complete
* @param \core_search\base $searcharea The search area that was complete
* @param int $numdocs The number of documents that were added to the index
* @param bool $fullindex True if a full index is being performed
* @return bool True means that data is considered indexed
Expand Down
2 changes: 1 addition & 1 deletion search/tests/fixtures/mock_search_area.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

defined('MOODLE_INTERNAL') || die;

class mock_search_area extends \core_search\area\base {
class mock_search_area extends \core_search\base {

/**
* Multiple context level so we can test get_areas_user_accesses.
Expand Down
2 changes: 1 addition & 1 deletion search/tests/fixtures/mock_search_engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function delete($areaid = null) {
return null;
}

public function to_document(\core_search\area\base $searcharea, $docdata) {
public function to_document(\core_search\base $searcharea, $docdata) {
return parent::to_document($searcharea, $docdata);
}

Expand Down
4 changes: 2 additions & 2 deletions search/tests/fixtures/testable_core_search.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ public function get_areas_user_accesses($limitcourseids = false) {
* Adds an enabled search component to the search areas list.
*
* @param string $areaid
* @param \core_search\area\base $searcharea
* @param \core_search\base $searcharea
* @return void
*/
public function add_search_area($areaid, \core_search\area\base $searcharea) {
public function add_search_area($areaid, \core_search\base $searcharea) {
self::$enabledsearchareas[$areaid] = $searcharea;
self::$allsearchareas[$areaid] = $searcharea;
}
Expand Down
2 changes: 1 addition & 1 deletion search/tests/manager_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function test_search_areas() {
$fakeareaid = \core_search\manager::generate_areaid('mod_unexisting', 'chihuaquita');

$searcharea = \core_search\manager::get_search_area($this->forumpostareaid);
$this->assertInstanceOf('\core_search\area\base', $searcharea);
$this->assertInstanceOf('\core_search\base', $searcharea);

$this->assertFalse(\core_search\manager::get_search_area($fakeareaid));

Expand Down
2 changes: 1 addition & 1 deletion user/classes/search/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* @copyright 2016 Devang Gaur {@link http://www.devanggaur.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class user extends \core_search\area\base {
class user extends \core_search\base {

/**
* Returns recordset containing required data attributes for indexing.
Expand Down

0 comments on commit 0bd8383

Please sign in to comment.