/webtrees/app/Services/ |
H A D | SearchService.php | 90 $query = DB::table('families'); 92 $this->whereTrees($query, 'f_file', $trees); 93 $this->whereSearch($query, 'f_gedcom', $search); 95 return $query 115 $query = DB::table('families') 132 $this->whereTrees($query, 'f_file', $trees); 133 $this->whereSearch($query, $field, $search); 135 $query 140 …return $this->paginateQuery($query, $this->familyRowMapper(), GedcomRecord::accessFilter(), $offse… 151 ->join('placelinks', static function (JoinClause $query) { [all …]
|
H A D | CalendarService.php | 109 $query = DB::table('dates') 111 ->where(static function (Builder $query) use ($jd1, $jd2): void { 112 $query->where(static function (Builder $query) use ($jd1, $jd2): void { 113 $query 116 })->orWhere(static function (Builder $query) use ($jd1, $jd2): void { 117 $query 125 $query->whereNotIn('d_fact', self::SKIP_FACTS); 129 $query->whereIn('d_fact', $matches[1]); 133 …$query->where('d_julianday1', '>=', Registry::timestampFactory()->now()->subtractYears(100)->julia… 136 $ind_query = (clone $query) [all …]
|
H A D | DatatablesService.php | 120 …* @param Builder $query A query to fetch the unfiltered rows and columns. 127 …public function handleQuery(ServerRequestInterface $request, Builder $query, array $search_columns… argument 136 $recordsTotal = (clone $query)->count(); 140 $query->where(static function (Builder $query) use ($search, $search_columns): void { 145 $query->orWhere($search_column, 'LIKE', $like); 158 $query->orderBy($sort_column, $value['dir']); 161 $query->orderBy(new Expression(1)); 166 $recordsFiltered = (clone $query)->count(); 168 $query->skip($start)->limit($length); 169 $data = $query->get(); [all …]
|
H A D | TreeService.php | 81 $query = DB::table('gedcom') 97 $query 114 ->where(static function (Builder $query): void { 115 $query 119 ->orWhere(static function (Builder $query): void { 120 $query 126 ->orWhere(static function (Builder $query): void { 127 $query 134 return $query 188 DB::query()->from('gedcom_setting')->insertUsing( [all …]
|
H A D | GedcomExportService.php | 362 $query = DB::table('families') 367 $query 372 return $query; 377 $query = DB::table('individuals') 382 $query 387 return $query; 392 $query = DB::table('sources') 397 $query 402 return $query; 407 $query = DB::table('media') [all …]
|
H A D | SiteLogsService.php | 58 $query = DB::table('log') 71 $query->where('log_time', '>=', $from_time); 80 $query->where('log_time', '<', $to_time); 84 $query->where('log_type', '=', $type); 88 $query->where('log_message', 'LIKE', '%' . addcslashes($text, '\\%_') . '%'); 92 $query->where('ip_address', 'LIKE', addcslashes($ip, '\\%_') . '%'); 96 $query->where('user_name', '=', $username); 100 $query->where('gedcom_name', '=', $tree); 103 return $query;
|
H A D | PendingChangesService.php | 290 $query = DB::table('change') 304 $query->where('change_time', '>=', $from_time); 314 $query->where('change_time', '<', $to_time); 318 $query->where('status', '=', $type); 322 $query->where('old_gedcom', 'LIKE', '%' . addcslashes($oldged, '\\%_') . '%'); 325 $query->where('new_gedcom', 'LIKE', '%' . addcslashes($newged, '\\%_') . '%'); 329 $query->where('xref', '=', $xref); 333 $query->where('user_name', 'LIKE', '%' . addcslashes($username, '\\%_') . '%'); 336 return $query;
|
H A D | LinkedRecordService.php | 60 ->whereIn('change_id', function (Builder $query) use ($record): void { 61 $query 90 $query = DB::table('families') 100 $query->where('l_type', '=', $link_type); 103 return $query 121 $query = DB::table('individuals') 131 $query->where('l_type', '=', $link_type); 134 return $query
|
/webtrees/app/Http/RequestHandlers/ |
H A D | MergeTreesAction.php | 72 DB::query()->from('individuals')->insertUsing([ 78 ], static function (Builder $query) use ($tree1, $tree2): void { 79 $query->select([ 89 DB::query()->from('families')->insertUsing([ 96 ], static function (Builder $query) use ($tree1, $tree2): void { 97 $query->select([ 108 DB::query()->from('sources')->insertUsing([ 113 ], static function (Builder $query) use ($tree1, $tree2): void { 114 $query->select([ 123 DB::query()->from('media')->insertUsing([ [all …]
|
H A D | SearchGeneralPage.php | 80 $query = Validator::queryParams($request)->string('query', ''); 119 $search_terms = $this->extractSearchTerms($query); 146 Log::addSearchLog('General: ' . $query, $search_trees->all()); 210 'query' => $query, 228 * @param string $query 232 private function extractSearchTerms(string $query): array argument 237 preg_match_all('/"([^"]+)"/', $query, $matches, PREG_SET_ORDER); 241 $query = strtr($query, [$match[0] => '']); 245 $query = preg_replace('/\p{Han}/u', '$0 ', $query); 248 preg_match_all('/[\S]+/', $query, $matches, PREG_SET_ORDER);
|
H A D | ManageMediaData.php | 161 $query = DB::table('media_file') 181 …$query->where(new Expression('setting_value || multimedia_file_refn'), 'LIKE', $media_folder . '%'… 184 …$query->where(new Expression('setting_value || multimedia_file_refn'), 'NOT LIKE', $media_folder .… 187 …return $this->datatables_service->handleQuery($request, $query, $search_columns, $sort_columns, $c… 190 $query = DB::table('media_file') 196 ->where(static function (Builder $query): void { 197 $query 208 …return $this->datatables_service->handleQuery($request, $query, $search_columns, $sort_columns, $c…
|
H A D | AbstractTomSelectHandler.php | 49 $query = Validator::queryParams($request)->string('query'); 56 if ($query !== '') { 57 $results = $this->search($tree, $query, $offset, $limit, $at ? '@' : ''); 78 * @param string $query 85 …abstract protected function search(Tree $tree, string $query, int $offset, int $limit, string $at)… argument
|
H A D | TomSelectLocation.php | 52 * @param string $query 59 …protected function search(Tree $tree, string $query, int $offset, int $limit, string $at): Collect… argument 62 $location = Registry::locationFactory()->make($query, $tree); 67 $search = array_filter(explode(' ', $query));
|
H A D | TomSelectFamily.php | 52 * @param string $query 59 …protected function search(Tree $tree, string $query, int $offset, int $limit, string $at): Collect… argument 62 $family = Registry::familyFactory()->make($query, $tree); 67 $search = array_filter(explode(' ', $query));
|
H A D | TomSelectRepository.php | 52 * @param string $query 59 …protected function search(Tree $tree, string $query, int $offset, int $limit, string $at): Collect… argument 62 $repository = Registry::repositoryFactory()->make($query, $tree); 67 $search = array_filter(explode(' ', $query));
|
H A D | TomSelectSource.php | 52 * @param string $query 59 …protected function search(Tree $tree, string $query, int $offset, int $limit, string $at): Collect… argument 62 $source = Registry::sourceFactory()->make($query, $tree); 67 $search = array_filter(explode(' ', $query));
|
/webtrees/app/Module/ |
H A D | FixSearchAndReplace.php | 137 $query = DB::table('families')->where('f_file', '=', $tree->id()); variable in Fisharebest\\Webtrees\\Module\\FixSearchAndReplace 138 $this->recordQuery($query, 'f_gedcom', $params); 140 return $query->pluck('f_id'); 158 $query = DB::table('individuals') variable in Fisharebest\\Webtrees\\Module\\FixSearchAndReplace 161 $this->recordQuery($query, 'i_gedcom', $params); 163 return $query->pluck('i_id'); 181 $query = DB::table('other') variable in Fisharebest\\Webtrees\\Module\\FixSearchAndReplace 185 $this->recordQuery($query, 'o_gedcom', $params); 187 return $query->pluck('o_id'); 205 $query = DB::table('media') variable in Fisharebest\\Webtrees\\Module\\FixSearchAndReplace [all …]
|
H A D | ModuleDataFixTrait.php | 171 $query = DB::table('families') 175 $query->whereBetween('f_id', [$params['start'], $params['end']]); 178 return $query; 202 $query = DB::table('individuals') 206 $query->whereBetween('i_id', [$params['start'], $params['end']]); 209 return $query; 233 $query = DB::table('other') 238 $query->whereBetween('o_id', [$params['start'], $params['end']]); 241 return $query; 265 $query = DB::table('media') [all …]
|
H A D | AbstractIndividualListModule.php | 492 protected function whereFamily(bool $fams, Builder $query): void argument 495 $query->join('link', static function (JoinClause $join): void { 507 protected function whereMarriedName(bool $marnm, Builder $query): void argument 510 $query->where('n_type', '<>', '_MARNM'); 532 $query = DB::table('name') 535 $this->whereFamily($fams, $query); 536 $this->whereMarriedName($marnm, $query); 539 $query->whereIn('n_surn', $surns); 542 $query 546 foreach ($query->get() as $row) { [all …]
|
H A D | MediaListModule.php | 249 $query = DB::table('media') 260 $query->where(static function (Builder $query): void { 261 $query 269 $query 275 $query->where('multimedia_file_refn', 'NOT LIKE', $folder . '/%/%'); 281 $query->where(static function (Builder $query) use ($filter): void { 283 $query 290 $query->where('source_media_type', '=', $format); 295 $query->orderBy('multimedia_file_refn'); 298 $query->orderBy('descriptive_title'); [all …]
|
H A D | FrequentlyAskedQuestionsModule.php | 137 ->where(static function (Builder $query) use ($tree): void { 138 $query 146 ->where(static function (Builder $query) use ($tree): void { 147 $query 410 ->where(static function (Builder $query) use ($tree): void { 411 $query 439 ->where(static function (Builder $query) use ($tree): void { 440 $query
|
/webtrees/app/Statistics/Repository/ |
H A D | IndividualRepository.php | 100 $query = DB::table('name') 115 $query->where('i_sex', '=', $sex); 120 $query->where('i_sex', '<>', 'U'); 124 $rows = $query 451 $query = DB::table('name') 456 $query 462 $query->whereIn('n_givn', $params); 465 $count = $query->count('n_givn'); 479 $query = DB::table('name') 484 $query->distinct() [all …]
|
H A D | FamilyRepository.php | 559 $query = DB::table('families') 565 $query 576 return $query->get()->all(); 714 $query = DB::table('link') 731 $query->whereBetween('d_year', [$year1, $year2]); 734 return $query; 1265 $query = DB::table('families') 1283 $query 1287 $query 1292 return $query [all …]
|
/webtrees/app/Statistics/Google/ |
H A D | ChartDistribution.php | 210 $query = DB::table('places') 225 return $this->filterEventPlaces($query, $fact); 236 $query = DB::table('places') 251 return $this->filterEventPlaces($query, $fact); 255 * @param Builder $query 260 private function filterEventPlaces(Builder $query, string $fact): array argument 264 foreach ($query->cursor() as $row) {
|
/webtrees/app/Report/ |
H A D | ReportParserGenerate.php | 1894 ->whereIn('change_id', function (Builder $query): void { 1895 $query->select([new Expression('MAX(change_id)')]) 1908 $query = DB::table('individuals') 1918 … $query->join('dates AS ' . $attr, static function (JoinClause $join) use ($attr): void { 1924 $query->where($attr . '.d_fact', '=', $match[1]); 1929 … $query->where($attr . '.d_julianday2', '<=', $date->maximumJulianDay()); 1931 … $query->where($attr . '.d_julianday1', '>=', $date->minimumJulianDay()); 1937 … $query->join('name AS ' . $attr, static function (JoinClause $join) use ($attr): void { 1945 … $query->where($attr . '.n_full', 'LIKE', '%' . addcslashes($name, '\\%_') . '%'); 1954 $query->where('i_gedcom', 'LIKE', $match[1]); [all …]
|