19     $quotes = array(
'\'', 
'"');
 
   20     $encoded = array(
'%27', 
'%22');
 
   21     return $url . str_replace($quotes, $encoded, 
$request->getRequestUri());
 
   38     elgg_deprecated_notice(__FUNCTION__ . 
' is deprecated. Use the plugin hook in \ElggEntity::getURL()', 1.9);
 
   41     if (!is_callable($function_name, 
true)) {
 
   45     if (!isset(
$CONFIG->entity_url_handler)) {
 
   46         $CONFIG->entity_url_handler = array();
 
   49     if (!isset(
$CONFIG->entity_url_handler[$entity_type])) {
 
   50         $CONFIG->entity_url_handler[$entity_type] = array();
 
   53     $CONFIG->entity_url_handler[$entity_type][$entity_subtype] = $function_name;
 
   71     if (!is_callable($function_name, 
true)) {
 
   75     if (!isset(
$CONFIG->relationship_url_handler)) {
 
   76         $CONFIG->relationship_url_handler = array();
 
   79     $CONFIG->relationship_url_handler[$relationship_type] = $function_name;
 
  101         $guid = $relationship->guid_one;
 
  102         $type = $relationship->relationship;
 
  110         if (isset(
$CONFIG->relationship_url_handler[
'all'])) {
 
  111             $function = 
$CONFIG->relationship_url_handler[
'all'];
 
  114         if (is_callable($function)) {
 
  115             $url = call_user_func($function, $relationship);
 
  119             $nameid = $relationship->id;
 
  147     if (!is_callable($function_name, 
true)) {
 
  151     if (!isset(
$CONFIG->extender_url_handler)) {
 
  152         $CONFIG->extender_url_handler = array();
 
  154     if (!isset(
$CONFIG->extender_url_handler[$extender_type])) {
 
  155         $CONFIG->extender_url_handler[$extender_type] = array();
 
  157     $CONFIG->extender_url_handler[$extender_type][$extender_name] = $function_name;
 
  177     $guid = $extender->entity_guid;
 
  178     $type = $extender->type;
 
  183     if (isset(
$CONFIG->extender_url_handler[
$type][$extender->name])) {
 
  184         $function = 
$CONFIG->extender_url_handler[
$type][$extender->name];
 
  187     if (isset(
$CONFIG->extender_url_handler[
$type][
'all'])) {
 
  188         $function = 
$CONFIG->extender_url_handler[
$type][
'all'];
 
  191     if (isset(
$CONFIG->extender_url_handler[
'all'][
'all'])) {
 
  192         $function = 
$CONFIG->extender_url_handler[
'all'][
'all'];
 
  195     if (is_callable($function)) {
 
  196         $url = call_user_func($function, $extender);
 
  200         $nameid = $extender->id;
 
  201         if (
$type == 
'volatile') {
 
  202             $nameid = $extender->name;
 
  204         $url = 
"export/$view/$guid/$type/$nameid/";
 
  277         'relationship' => 
'member',
 
  278         'relationship_guid' => $group_guid,
 
  279         'inverse_relationship' => 
true,
 
  284         'site_guid' => $site_guid
 
  300     $group_guid = (int)$group_guid;
 
  301     $object_guid = (int)$object_guid;
 
  311         $msg = 
"GUID:" . $group_guid . 
" is not a valid " . 
'\ElggGroup';
 
  312         throw new \InvalidClassException($msg);
 
  316         $msg = 
"GUID:" . $object_guid . 
" is not a valid " . 
'\ElggObject';
 
  317         throw new \InvalidClassException($msg);
 
  320     $object->container_guid = $group_guid;
 
  336     $group_guid = (int)$group_guid;
 
  337     $object_guid = (int)$object_guid;
 
  347         $msg = 
"GUID:" . $group_guid . 
" is not a valid " . 
'\ElggGroup';
 
  348         throw new \InvalidClassException($msg);
 
  352         $msg = 
"GUID:" . $object_guid . 
" is not a valid " . 
'\ElggObject';
 
  353         throw new \InvalidClassException($msg);
 
  392         'relationship' => 
'member',
 
  394         'inverse_relationship' => 
false,
 
  410     elgg_deprecated_notice(__FUNCTION__ . 
' is deprecated. Use \ElggUser::isFriendsOf() or \ElggUser::isFriendsWith()', 1.9);
 
  430         'relationship' => 
'friend',
 
  455         'relationship' => 
'friend',
 
  457         'inverse_relationship' => 
true,
 
  529     $site_guid = (int)$site_guid;
 
  546     $site_guid = (int)$site_guid;
 
  563     $site_guid = (int)$site_guid;
 
  564     $object_guid = (int)$object_guid;
 
  580     $site_guid = (int)$site_guid;
 
  581     $object_guid = (int)$object_guid;
 
  599     $site_guid = (int)$site_guid;
 
  604         'relationship' => 
'member_of_site',
 
  605         'relationship_guid' => $site_guid,
 
  606         'inverse_relationship' => 
true,
 
  626     $object_guid = (int)$object_guid;
 
  631         'relationship' => 
'member_of_site',
 
  632         'relationship_guid' => $object_guid,
 
  657         'relationship' => 
'member_of_site',
 
  659         'inverse_relationship' => 
false,
 
  695     $functionname = 
"elgg_get_{$type}_from_id";
 
  696     if (is_callable($functionname)) {
 
  697         $extender = call_user_func($functionname, $extender_id);
 
  708     if ($extender->getOwnerGUID() == 
$user_guid) {
 
  713     $entity = $extender->getEntity();
 
  738     $delta = ((
$max - $min) / $buckets);
 
  739     $thresholds = array();
 
  741     for (
$n = 1; 
$n <= $buckets; 
$n++) {
 
  742         $thresholds[
$n - 1] = ($min + 
$n) * $delta;
 
  746     if ($thresholds[$buckets - 1] > 
$max) {
 
  747         $thresholds[$buckets - 1] = 
$max;
 
  751     for (
$n = 0; 
$n < count($thresholds); 
$n++) {
 
  752         if ($number_of_tags >= $thresholds[
$n]) {
 
  777     foreach (
$tags as $tag) {
 
  780         if ($cloud[$tag] > 
$max) {
 
  784         if ($cloud[$tag] < $min) {
 
  789     foreach ($cloud as $k => $v) {
 
  829     if ($case_sensitive) {
 
  843         static $metastrings_memcache;
 
  845             $metastrings_memcache = new \ElggMemcache(
'metastrings_memcache');
 
  847         if ($metastrings_memcache) {
 
  848             $msfc = $metastrings_memcache->load(
$string);
 
  856     if ($case_sensitive) {
 
  857         $query = 
"SELECT * from {$CONFIG->dbprefix}metastrings where string= BINARY '$string' limit 1";
 
  859         $query = 
"SELECT * from {$CONFIG->dbprefix}metastrings where string = '$string'";
 
  864     if (is_array($metaStrings)) {
 
  865         if (
sizeof($metaStrings) > 1) {
 
  867             foreach ($metaStrings as $metaString) {
 
  868                 $ids[] = $metaString->id;
 
  871         } 
else if (isset($metaStrings[0])) {
 
  872             $row = $metaStrings[0];
 
  877         $METASTRINGS_CACHE[
$row->id] = 
$row->string; 
 
  880         if ($metastrings_memcache) {
 
  881             $metastrings_memcache->save(
$row->string, 
$row->id);
 
  913     $result = 
insert_data(
"INSERT into {$CONFIG->dbprefix}metastrings (string) values ('$sanstring')");
 
  934     global 
$CONFIG, $METASTRINGS_CACHE;
 
  938     if (isset($METASTRINGS_CACHE[
$id])) {
 
  939         return $METASTRINGS_CACHE[
$id];
 
  942     $row = 
get_data_row(
"SELECT * from {$CONFIG->dbprefix}metastrings where id='$id' limit 1");
 
  944         $METASTRINGS_CACHE[
$id] = 
$row->string;
 
  965     $offset = 0, $timelower = 0, $timeupper = 0) {
 
  973         'created_time_lower' => $timelower,
 
  974         'created_time_upper' => $timeupper,
 
  975         'relationship' => 
'friend',
 
  977         'relationship_join_on' => 
'container_guid',
 
  993 $timelower = 0, $timeupper = 0) {
 
  999         'created_time_lower' => $timelower,
 
 1000         'created_time_upper' => $timeupper,
 
 1001         'relationship' => 
'friend',
 
 1003         'relationship_join_on' => 
'container_guid',
 
 1026     $listtypetoggle = 
true, 
$pagination = 
true, $timelower = 0, $timeupper = 0) {
 
 1028     elgg_deprecated_notice(__FUNCTION__ . 
' is deprecated. Use elgg_list_entities_from_relationship()', 1.9);
 
 1033         'created_time_lower' => $timelower,
 
 1034         'created_time_upper' => $timeupper,
 
 1036         'list_type_toggle' => $listtypetoggle,
 
 1038         'relationship' => 
'friend',
 
 1040         'relationship_join_on' => 
'container_guid',
 
 1058     if (is_array($location)) {
 
 1065     $query = 
"SELECT * from {$CONFIG->dbprefix}geocode_cache WHERE location='$location'";
 
 1068     if ($cached_location) {
 
 1069         return array(
'lat' => $cached_location->lat, 
'long' => $cached_location->long);
 
 1079         $long = (float)
$return[
'long'];
 
 1082         $query = 
"INSERT DELAYED INTO {$CONFIG->dbprefix}geocode_cache " 
 1083             . 
" (location, lat, `long`) VALUES ('$location', '{$lat}', '{$long}')" 
 1084             . 
" ON DUPLICATE KEY UPDATE lat='{$lat}', `long`='{$long}'";
 
 1127     if (!is_array(
$options[
'distance'])) {
 
 1128         $lat_distance = (float)
$options[
'distance'];
 
 1129         $long_distance = (float)
$options[
'distance'];
 
 1131         $lat_distance = (float)
$options[
'distance'][
'latitude'];
 
 1132         $long_distance = (float)
$options[
'distance'][
'longitude'];
 
 1135     $lat = (float)
$options[
'latitude'];
 
 1136     $long = (float)
$options[
'longitude'];
 
 1137     $lat_min = $lat - $lat_distance;
 
 1138     $lat_max = $lat + $lat_distance;
 
 1139     $long_min = $long - $long_distance;
 
 1140     $long_max = $long + $long_distance;
 
 1143     $wheres[] = 
"lat_name.string='geo:lat'";
 
 1144     $wheres[] = 
"lat_value.string >= $lat_min";
 
 1145     $wheres[] = 
"lat_value.string <= $lat_max";
 
 1146     $wheres[] = 
"lon_name.string='geo:long'";
 
 1147     $wheres[] = 
"lon_value.string >= $long_min";
 
 1148     $wheres[] = 
"lon_value.string <= $long_max";
 
 1151     $joins[] = 
"JOIN {$CONFIG->dbprefix}metadata lat on e.guid=lat.entity_guid";
 
 1152     $joins[] = 
"JOIN {$CONFIG->dbprefix}metastrings lat_name on lat.name_id=lat_name.id";
 
 1153     $joins[] = 
"JOIN {$CONFIG->dbprefix}metastrings lat_value on lat.value_id=lat_value.id";
 
 1154     $joins[] = 
"JOIN {$CONFIG->dbprefix}metadata lon on e.guid=lon.entity_guid";
 
 1155     $joins[] = 
"JOIN {$CONFIG->dbprefix}metastrings lon_name on lon.name_id=lon_name.id";
 
 1156     $joins[] = 
"JOIN {$CONFIG->dbprefix}metastrings lon_value on lon.value_id=lon_value.id";
 
 1161     } elseif (!isset(
$options[
'wheres'])) {
 
 1169     } elseif (!isset(
$options[
'joins'])) {
 
 1197 define(
"MILE", 0.01515);
 
 1198 define(
"KILOMETER", 0.00932);
 
 1226     for (
$n = 0; 
$n < strlen($extra_escapeable); 
$n++) {
 
 1280     return _elgg_services()->db->updateData(
"OPTIMIZE TABLE $table");
 
 1292 function get_db_tables() {
 
 1296     if (isset($tables)) {
 
 1307             if (is_array(
$row) && !empty(
$row)) {
 
 1308                 foreach (
$row as $element) {
 
 1309                     $tables[] = $element;
 
 1329     return mysql_error($dblink);
 
 1363     return mktime(0, 0, 0, $month, $day, $year);
 
 1379     return mktime(23, 59, 59, $month, $day, $year);
 
 1413     $start_time = (int)$start_time;
 
 1414     $end_time = (int)$end_time;
 
 1418     $site_guid = (int) $site_guid;
 
 1419     if ($site_guid == 0) {
 
 1420         $site_guid = 
$CONFIG->site_guid;
 
 1425     if (is_array(
$type)) {
 
 1427         if (
sizeof(
$type)) {
 
 1428             foreach (
$type as $typekey => $subtypearray) {
 
 1429                 foreach ($subtypearray as $subtypeval) {
 
 1431                     if (!empty($subtypeval)) {
 
 1436                     if (!empty($tempwhere)) {
 
 1437                         $tempwhere .= 
" or ";
 
 1439                     $tempwhere .= 
"(e.type = '{$typekey}' and e.subtype = {$subtypeval})";
 
 1443         if (!empty($tempwhere)) {
 
 1444             $where[] = 
"({$tempwhere})";
 
 1451             $where[] = 
"e.type='$type'";
 
 1455             $where[] = 
"e.subtype=$subtype";
 
 1463             $where[] = 
"e.owner_guid = '$owner_guid'";
 
 1465             $owner_array = array_map(
'sanitise_int', 
$owner_guid);
 
 1468             $where[] = 
"e.owner_guid in ({$owner_guid})";
 
 1475     if ($site_guid > 0) {
 
 1476         $where[] = 
"e.site_guid = {$site_guid}";
 
 1484             $where[] = 
"e.container_guid in (" . implode(
",", 
$container_guid) . 
")";
 
 1487             $where[] = 
"e.container_guid = {$container_guid}";
 
 1493         JOIN {$CONFIG->dbprefix}metadata cal_start on e.guid=cal_start.entity_guid 
 1494         JOIN {$CONFIG->dbprefix}metastrings cal_start_name on cal_start.name_id=cal_start_name.id 
 1495         JOIN {$CONFIG->dbprefix}metastrings cal_start_value on cal_start.value_id=cal_start_value.id 
 1497         JOIN {$CONFIG->dbprefix}metadata cal_end on e.guid=cal_end.entity_guid 
 1498         JOIN {$CONFIG->dbprefix}metastrings cal_end_name on cal_end.name_id=cal_end_name.id 
 1499         JOIN {$CONFIG->dbprefix}metastrings cal_end_value on cal_end.value_id=cal_end_value.id 
 1501     $where[] = 
"cal_start_name.string='calendar_start'";
 
 1502     $where[] = 
"cal_start_value.string>=$start_time";
 
 1503     $where[] = 
"cal_end_name.string='calendar_end'";
 
 1504     $where[] = 
"cal_end_value.string <= $end_time";
 
 1508         $query = 
"SELECT e.* from {$CONFIG->dbprefix}entities e $cal_join where ";
 
 1510         $query = 
"SELECT count(e.guid) as total from {$CONFIG->dbprefix}entities e $cal_join where ";
 
 1512     foreach ($where as $w) {
 
 1513         $query .= 
" $w and ";
 
 1519         $query .= 
" order by n.calendar_start $order_by";
 
 1522             $query .= 
" limit $offset, $limit";
 
 1524         $dt = 
get_data($query, 
"entity_row_to_elggstar");
 
 1529         return $total->total;
 
 1555 $site_guid = 0, 
$count = 
false) {
 
 1563     $start_time = (int)$start_time;
 
 1564     $end_time = (int)$end_time;
 
 1569     if ($order_by == 
"") {
 
 1570         $order_by = 
"e.time_created desc";
 
 1573     $site_guid = (int) $site_guid;
 
 1582     if ($site_guid == 0) {
 
 1583         $site_guid = 
$CONFIG->site_guid;
 
 1590     if ($entity_type != 
"") {
 
 1591         $where[] = 
"e.type='$entity_type'";
 
 1594     if ($entity_subtype) {
 
 1595         $where[] = 
"e.subtype=$entity_subtype";
 
 1598     if ($meta_name != 
"") {
 
 1599         $where[] = 
"m.name_id='$meta_n'";
 
 1602     if ($meta_value != 
"") {
 
 1603         $where[] = 
"m.value_id='$meta_v'";
 
 1606     if ($site_guid > 0) {
 
 1607         $where[] = 
"e.site_guid = {$site_guid}";
 
 1611         $where[] = 
"e.container_guid in (" . implode(
",", 
$owner_guid) . 
")";
 
 1613         $where[] = 
"e.container_guid = {$owner_guid}";
 
 1618         JOIN {$CONFIG->dbprefix}metadata cal_start on e.guid=cal_start.entity_guid 
 1619         JOIN {$CONFIG->dbprefix}metastrings cal_start_name on cal_start.name_id=cal_start_name.id 
 1620         JOIN {$CONFIG->dbprefix}metastrings cal_start_value on cal_start.value_id=cal_start_value.id 
 1622         JOIN {$CONFIG->dbprefix}metadata cal_end on e.guid=cal_end.entity_guid 
 1623         JOIN {$CONFIG->dbprefix}metastrings cal_end_name on cal_end.name_id=cal_end_name.id 
 1624         JOIN {$CONFIG->dbprefix}metastrings cal_end_value on cal_end.value_id=cal_end_value.id 
 1627     $where[] = 
"cal_start_name.string='calendar_start'";
 
 1628     $where[] = 
"cal_start_value.string>=$start_time";
 
 1629     $where[] = 
"cal_end_name.string='calendar_end'";
 
 1630     $where[] = 
"cal_end_value.string <= $end_time";
 
 1633         $query = 
"SELECT distinct e.* ";
 
 1635         $query = 
"SELECT count(distinct e.guid) as total ";
 
 1638     $query .= 
"from {$CONFIG->dbprefix}entities e" 
 1639     . 
" JOIN {$CONFIG->dbprefix}metadata m on e.guid = m.entity_guid $cal_join where";
 
 1641     foreach ($where as $w) {
 
 1642         $query .= 
" $w and ";
 
 1651         $query .= 
" order by $order_by limit $offset, $limit";
 
 1652         return get_data($query, 
"entity_row_to_elggstar");
 
 1692     $start_time = (int)$start_time;
 
 1693     $end_time = (int)$end_time;
 
 1695     $relationship_guid = (int)$relationship_guid;
 
 1696     $inverse_relationship = (bool)$inverse_relationship;
 
 1700     if ($order_by == 
"") {
 
 1701         $order_by = 
"time_created desc";
 
 1706     $site_guid = (int) $site_guid;
 
 1707     if ($site_guid == 0) {
 
 1708         $site_guid = 
$CONFIG->site_guid;
 
 1715     if ($relationship != 
"") {
 
 1716         $where[] = 
"r.relationship='$relationship'";
 
 1718     if ($relationship_guid) {
 
 1719         $where[] = $inverse_relationship ?
 
 1720             "r.guid_two='$relationship_guid'" : 
"r.guid_one='$relationship_guid'";
 
 1723         $where[] = 
"e.type='$type'";
 
 1726         $where[] = 
"e.subtype=$subtype";
 
 1729         $where[] = 
"e.container_guid='$owner_guid'";
 
 1731     if ($site_guid > 0) {
 
 1732         $where[] = 
"e.site_guid = {$site_guid}";
 
 1737         JOIN {$CONFIG->dbprefix}metadata cal_start on e.guid=cal_start.entity_guid 
 1738         JOIN {$CONFIG->dbprefix}metastrings cal_start_name on cal_start.name_id=cal_start_name.id 
 1739         JOIN {$CONFIG->dbprefix}metastrings cal_start_value on cal_start.value_id=cal_start_value.id 
 1741         JOIN {$CONFIG->dbprefix}metadata cal_end on e.guid=cal_end.entity_guid 
 1742         JOIN {$CONFIG->dbprefix}metastrings cal_end_name on cal_end.name_id=cal_end_name.id 
 1743         JOIN {$CONFIG->dbprefix}metastrings cal_end_value on cal_end.value_id=cal_end_value.id 
 1745     $where[] = 
"cal_start_name.string='calendar_start'";
 
 1746     $where[] = 
"cal_start_value.string>=$start_time";
 
 1747     $where[] = 
"cal_end_name.string='calendar_end'";
 
 1748     $where[] = 
"cal_end_value.string <= $end_time";
 
 1751     $joinon = 
"e.guid = r.guid_one";
 
 1752     if (!$inverse_relationship) {
 
 1753         $joinon = 
"e.guid = r.guid_two";
 
 1757         $query = 
"SELECT count(distinct e.guid) as total ";
 
 1759         $query = 
"SELECT distinct e.* ";
 
 1761     $query .= 
" from {$CONFIG->dbprefix}entity_relationships r" 
 1762     . 
" JOIN {$CONFIG->dbprefix}entities e on $joinon $cal_join where ";
 
 1764     foreach ($where as $w) {
 
 1765         $query .= 
" $w and ";
 
 1770         $query .= 
" order by $order_by limit $offset, $limit"; 
 
 1771         return get_data($query, 
"entity_row_to_elggstar");
 
 1867     return get_notable_entities_from_relationship($day_start, $day_end, $relationship,
 
 1892 $limit = 10, $fullview = 
true, $listtypetoggle = 
false, $navigation = 
true) {
 
 1903         $fullview, $listtypetoggle, $navigation);
 
 1924 $fullview = 
true, $listtypetoggle = 
false, $navigation = 
true) {
 
 1931         $fullview, $listtypetoggle, $navigation);
 
 2050                     'relationship' => 
'attached',
 
 2051                     'relationship_guid' => 
$guid,
 
 2052                     'inverse_relationship' => 
false,
 
 2056                     'order_by' => 
'time_created desc',
 
 2143         return $entity->delete($recursive);
 
 2194     elgg_deprecated_notice(
'can_edit_entity_metadata has been deprecated in favor of \ElggEntity::canEditMetadata', 
'1.9');
 
 2226         return $entity->disable($reason, $recursive);
 
 2270         return $group->join(
$user);
 
 2291         return $group->leave(
$user);
 
 2315         $call_method = 
"GET", $require_api_auth = 
false, $require_user_auth = 
false) {
 
 2316     elgg_deprecated_notice(
"expose_function() deprecated for the function elgg_ws_expose_function() in web_services plugin", 1.9);
 
 2319             You must enable this plugin and update your web services to use elgg_ws_expose_function().");
 
 2322     if (function_exists(
"elgg_ws_expose_function")) {
 
 2323         return elgg_ws_expose_function(
$method, $function, $parameters, 
$description, $call_method, $require_api_auth, $require_user_auth);
 
 2335     elgg_deprecated_notice(
"unexpose_function() deprecated for the function elgg_ws_unexpose_function() in web_services plugin", 1.9);
 
 2336     if (function_exists(
"elgg_ws_unexpose_function")) {
 
 2337         return elgg_ws_unexpose_function(
$method);
 
 2350     elgg_deprecated_notice(
"register_service_handler() deprecated for the function elgg_ws_register_service_handler() in web_services plugin", 1.9);
 
 2351     if (function_exists(
"elgg_ws_register_service_handler")) {
 
 2352         return elgg_ws_register_service_handler(
$handler, $function);
 
 2366     elgg_deprecated_notice(
"unregister_service_handler() deprecated for the function elgg_ws_unregister_service_handler() in web_services plugin", 1.9);
 
 2367     if (function_exists(
"elgg_ws_unregister_service_handler")) {
 
 2368         return elgg_ws_unregister_service_handler(
$handler);
 
 2398         $query = 
"SELECT guid from {$CONFIG->dbprefix}sites_entity where guid = {$guid}";
 
 2400             $query = 
"UPDATE {$CONFIG->dbprefix}sites_entity 
 2401                 set name='$name', description='$description', url='$url' where guid=$guid";
 
 2416             $query = 
"INSERT into {$CONFIG->dbprefix}sites_entity 
 2417                 (guid, name, description, url) values ($guid, '$name', '$description', '$url')";
 
 2459         $exists = 
get_data_row(
"SELECT guid from {$CONFIG->dbprefix}groups_entity WHERE guid = {$guid}");
 
 2461             $query = 
"UPDATE {$CONFIG->dbprefix}groups_entity set" 
 2462                 . 
" name='$name', description='$description' where guid=$guid";
 
 2475             $query = 
"INSERT into {$CONFIG->dbprefix}groups_entity" 
 2476                 . 
" (guid, name, description) values ($guid, '$name', '$description')";
 
 2525         $query = 
"SELECT guid from {$CONFIG->dbprefix}users_entity where guid = {$guid}";
 
 2527             $query = 
"UPDATE {$CONFIG->dbprefix}users_entity 
 2528                 SET name='$name', username='$username', password='$password', salt='$salt', 
 2529                 email='$email', language='$language' 
 2530                 WHERE guid = $guid";
 
 2544             $query = 
"INSERT into {$CONFIG->dbprefix}users_entity 
 2545                 (guid, name, username, password, salt, email, language) 
 2546                 values ($guid, '$name', '$username', '$password', '$salt', '$email', '$language')";
 
 2587         $query = 
"SELECT guid from {$CONFIG->dbprefix}objects_entity where guid = {$guid}";
 
 2589             $query = 
"UPDATE {$CONFIG->dbprefix}objects_entity 
 2590                 set title='$title', description='$description' where guid=$guid";
 
 2601             $query = 
"INSERT into {$CONFIG->dbprefix}objects_entity 
 2602                 (guid, title, description) values ($guid, '$title','$description')";
 
 2630     $name = $element->name;
 
 2640         case 'relationship' :
 
 2648         foreach ($element->attributes as $k => $v) {
 
 2649             $odd->setAttribute($k, $v);
 
 2653         $body = $element->content;
 
 2654         $a = stripos(
$body, 
"<![CDATA");
 
 2655         $b = strripos(
$body, 
"]]>");
 
 2656         if ((
$body) && ($a !== 
false) && ($b !== 
false)) {
 
 2657             $body = substr(
$body, $a + 8, $b - ($a + 8));
 
 2660         $odd->setBody(
$body);
 
 2691             if (class_exists($classname)) {
 
 2692                 $tmp = 
new $classname();
 
 2695                     $msg = $classname . 
" is not a " . get_class() . 
".";
 
 2696                     throw new \ClassException($msg);
 
 2699                 error_log(
"Class '" . $classname . 
"' was not found, missing plugin?");
 
 2704                     $tmp = new \ElggObject();
 
 2707                     $tmp = new \ElggUser();
 
 2710                     $tmp = new \ElggGroup();
 
 2713                     $tmp = new \ElggSite();
 
 2716                     $msg = 
"Type " . 
$class . 
" is not supported. This indicates an error in your installation, most likely caused by an incomplete upgrade.";
 
 2717                     throw new \InstallationException($msg);
 
 2723         if (!$tmp->import($element)) {
 
 2724             $msg = 
"Could not import element " . $element->
getAttribute(
'uuid');
 
 2725             throw new \ImportException($msg);
 
 2749     if ((!$elements) || (!$elements->children)) {
 
 2759     foreach ($elements->children as $child) {
 
 2763             $document->addElement($odd);
 
 2804         if (
$type == 
'volatile') {
 
 2860     $options = array(
'metadata_name' => 
'import_uuid', 
'metadata_value' => $uuid);
 
 2864         return $entities[0];
 
 2909     $to_be_serialised = 
null;
 
 2945     if ((!is_array($to_be_serialised)) || (count($to_be_serialised) == 0)) {
 
 2946         throw new \ExportException(
"No such entity GUID:" . 
$guid);
 
 2949     return $to_be_serialised;
 
 2985 function import($xml) {
 
 2994         throw new \ImportException(
"No OpenDD elements found in import data, import failed.");
 
 2997     foreach ($document as $element) {
 
 3002         throw new \ImportException(
"Not all elements were imported.");
 
 3038     if (file_exists($dir) && is_dir($dir)) {
 
 3039         if ($handle = opendir($dir)) {
 
 3040             while (
$view = readdir($handle)) {
 
 3041                 if (!in_array(
$view, array(
'.', 
'..', 
'.svn', 
'CVS'))) {
 
 3042                     if (is_dir($dir . 
'/' . 
$view)) {
 
 3075     static $treecache = array();
 
 3083     if (!empty($treecache[$view_root])) {
 
 3084         return $treecache[$view_root];
 
 3090             $pos = strpos(
$view, $view_root);
 
 3092                 $treecache[$view_root][] = 
$view;
 
 3098     $location = 
$CONFIG->viewpath;
 
 3100     $root = $location . 
$viewtype . 
'/' . $view_root;
 
 3102     if (file_exists($root) && is_dir($root)) {
 
 3104         if (!is_array($treecache[$view_root])) {
 
 3105             $treecache[$view_root] = array();
 
 3107         $treecache[$view_root] = array_merge($treecache[$view_root], $val);
 
 3110     return $treecache[$view_root];
 
 3129 $posted = 0, $annotation_id = 0, $target_guid = 0) {
 
 3133     $access_id = ($access_id == 
'') ? 
null : $access_id;
 
 3138         'action_type' => $action_type,
 
 3139         'subject_guid' => $subject_guid,
 
 3140         'object_guid' => $object_guid,
 
 3141         'target_guid' => $target_guid,
 
 3142         'access_id' => $access_id,
 
 3144         'annotation_id' => $annotation_id,
 
 3167     $vars = method_exists(
$data, 
"export") ? get_object_vars(
$data->export()) : get_object_vars(
$data);
 
 3171     if ((
$n == 0) || ( is_object(
$data) && !(
$data instanceof \stdClass))) {
 
 3180         } 
else if (is_array(
$value)) {
 
 3182         } 
else if (gettype(
$value) == 
"boolean") {
 
 3191     if ((
$n == 0) || (is_object(
$data) && !(
$data instanceof \stdClass))) {
 
 3217         $item = 
"array_item";
 
 3219         if (is_numeric(
$key)) {
 
 3220             $output .= 
"<$item name=\"$key\" type=\"" . gettype(
$value) . 
"\">";
 
 3228         } 
else if (is_array(
$value)) {
 
 3230         } 
else if (gettype(
$value) == 
"boolean") {
 
 3256     return new \ElggXMLElement($xml);
 
 3273         $breakdown = parse_url(
$site->url);
 
 3274         return $breakdown[
'host'];
 
 3297     _elgg_services()->notifications->setDeprecatedNotificationSubject($entity_type, $object_subtype, $language_name);
 
 3343     throw new \BadFunctionCallException(
"object_notifications is a private function and should not be called directly");
 
 3401     $element = 
$params[
'element'];
 
 3410             if (!$tmp->save()) {
 
 3411                 $msg = 
"There was a problem saving " . $element->getAttribute(
'uuid');
 
 3412                 throw new \ImportException($msg);
 
 3417                 throw new \ImportException(
"New entity created but has no GUID, this should not happen.");
 
 3448         throw new \InvalidParameterException(
"GUID has not been specified during export, this should never happen.");
 
 3451     if (!is_array($returnvalue)) {
 
 3452         throw new \InvalidParameterException(
"Entity serialisation function passed a non-array returnvalue parameter");
 
 3460         $msg = 
"GUID:" . 
$guid . 
" is not a valid " . get_class();
 
 3461         throw new \InvalidClassException($msg);
 
 3468             $returnvalue[] = 
$e;
 
 3474     return $returnvalue;
 
 3496     if (($hook == 
'volatile') && ($entity_type == 
'metadata')) {
 
 3497         if ((
$guid) && ($variable_name)) {
 
 3498             switch ($variable_name) {
 
 3499                 case 'renderedentity' :
 
 3504                     $tmp = new \ElggMetadata();
 
 3505                     $tmp->type = 
'volatile';
 
 3506                     $tmp->name = 
'renderedentity';
 
 3507                     $tmp->value = 
$view;
 
 3508                     $tmp->entity_guid = 
$guid;
 
 3536         throw new \InvalidParameterException(
"GUID has not been specified during export, this should never happen.");
 
 3539     if (!is_array($returnvalue)) {
 
 3540         throw new \InvalidParameterException(
"Entity serialization function passed a non-array returnvalue parameter");
 
 3553             $returnvalue[] = 
$r->export();
 
 3557     return $returnvalue;
 
 3576     $element = 
$params[
'element'];
 
 3583         $entity_uuid = $element->getAttribute(
'entity_uuid');
 
 3586             throw new \ImportException(
"Entity '" . $entity_uuid . 
"' could not be found.");
 
 3593             $attr_name = $element->getAttribute(
'name');
 
 3594             $msg = 
"There was a problem updating '" . $attr_name . 
"' on entity '" . $entity_uuid . 
"'";
 
 3595             throw new \ImportException($msg);
 
 3618     $attr_val = $element->
getBody();
 
 3625             $entity->annotate($attr_name, $attr_val);
 
 3628             $entity->setMetadata($attr_name, $attr_val, 
"", 
true);
 
 3631             $entity->set($attr_name, $attr_val);
 
 3637         $entity->set(
'time_updated', $attr_time);
 
 3660         throw new \InvalidParameterException(
"GUID has not been specified during export, this should never happen.");
 
 3663     if (!is_array($returnvalue)) {
 
 3664         throw new \InvalidParameterException(
"Entity serialisation function passed a non-array returnvalue parameter");
 
 3668         'guid' => (
int)
$params[
'guid'],
 
 3675             $returnvalue[] = 
$r->export();
 
 3679     return $returnvalue;
 
 3699         throw new \InvalidParameterException(
"GUID has not been specified during export, this should never happen.");
 
 3702     if (!is_array($returnvalue)) {
 
 3703         throw new \InvalidParameterException(
"Entity serialisation function passed a non-array returnvalue parameter");
 
 3712             $returnvalue[] = 
$r->export();
 
 3716     return $returnvalue;
 
 3732     $element = 
$params[
'element'];
 
 3737         $tmp = new \ElggRelationship();
 
 3738         $tmp->import($element);
 
 3763         'table_alias' => $table_prefix,
 
 3764         'user_guid' => (
int)
$owner,
 
 3785     if (!$mainfilename) {
 
 3786         if ($backtrace = debug_backtrace()) {
 
 3787             foreach ($backtrace as 
$step) {
 
 3788                 $file = 
$step[
'file'];
 
 3789                 $file = str_replace(
"\\", 
"/", $file);
 
 3790                 $file = str_replace(
"//", 
"/", $file);
 
 3791                 if (preg_match(
"/mod\/([a-zA-Z0-9\-\_]*)\/start\.php$/", $file, $matches)) {
 
 3801             $file = $_SERVER[
"SCRIPT_NAME"];
 
 3802             $file = str_replace(
"\\", 
"/", $file);
 
 3803             $file = str_replace(
"//", 
"/", $file);
 
 3804             if (preg_match(
"/mod\/([a-zA-Z0-9\-\_]*)\//", $file, $matches)) {
 
 3833     $events->registerHandler(
'init', 
'system', 
'_export_init', 100);
 
 3836     $hooks->registerHandler(
"import", 
"all", 
"import_entity_plugin_hook", 0);
 
 3837     $hooks->registerHandler(
"import", 
"all", 
"import_extender_plugin_hook", 2);
 
 3838     $hooks->registerHandler(
"import", 
"all", 
"import_relationship_plugin_hook", 3);
 
 3841     $hooks->registerHandler(
"export", 
"all", 
"export_entity_plugin_hook", 0);
 
 3842     $hooks->registerHandler(
"export", 
"all", 
"export_annotation_plugin_hook", 2);
 
 3843     $hooks->registerHandler(
"export", 
"all", 
"export_metadata_plugin_hook", 2);
 
 3844     $hooks->registerHandler(
"export", 
"all", 
"export_relationship_plugin_hook", 3);
 
 3847     $hooks->registerHandler(
'volatile', 
'metadata', 
'volatile_data_export_plugin_hook');
 
if(! $collection_name) $id
 
elgg_register_action($action, $filename="", $access='logged_in')
Registers an action.
 
if($guid==elgg_get_logged_in_user_guid()) $name
 
if(isset($vars['id'])) $class
 
elgg_get_annotation_from_id($id)
Get a specific annotation by its id.
 
elgg_get_annotations(array $options=array())
Returns annotations.
 
$user_guid
Avatar remove action.
 
elgg_reset_system_cache()
Reset the system cache by deleting the caches.
 
elgg_invalidate_simplecache()
Deletes all cached views in the simplecache and sets the lastcache and lastupdate time to 0 for every...
 
elgg_load_system_cache($type)
Retrieve the contents of a system cache.
 
elgg_disable_system_cache()
Disables the system disk cache.
 
elgg_save_system_cache($type, $data)
Saves a system cache.
 
elgg_get_system_cache()
Returns an \ElggCache object suitable for caching system information.
 
elgg_enable_system_cache()
Enables the system disk cache.
 
getBody()
Gets the body of the ODD.
 
getAttribute($key)
Returns an attribute.
 
elgg_get_site_url($site_guid=0)
Get the URL for the current (or specified) site.
 
elgg_get_config($name, $site_guid=0)
Get an Elgg configuration value.
 
$guid
Removes an admin notice.
 
export_entity_plugin_hook($hook, $entity_type, $returnvalue, $params)
Exports all attributes of an entity.
 
get_uuid_from_object($object)
Get a UUID from a given object.
 
global $METASTRINGS_DEADNAME_CACHE
 
get_notable_entities($start_time, $end_time, $type="", $subtype="", $owner_guid=0, $order_by="asc", $limit=10, $offset=0, $count=false, $site_guid=0, $container_guid=null)
Return the notable entities for a given time period.
 
remove_attachment($guid_one, $guid_two)
Function to remove a particular attachment between two objects.
 
ODD_Import($xml)
Import an ODD document.
 
get_entity_url($entity_guid)
Returns the URL for an entity.
 
ODD_factory(XmlElement $element)
Attempt to construct an ODD object out of a XmlElement or sub-elements.
 
remove_site_user($site_guid, $user_guid)
Remove a user from a site.
 
user_is_friend($user_guid, $friend_guid)
Determines whether or not a user is another user's friend.
 
add_metastring($string, $case_sensitive=true)
Add a metastring.
 
get_db_error($dblink)
Get the last database error for a particular database link.
 
create_group_entity($guid, $name, $description)
Create or update the entities table for a given group.
 
create_user_entity($guid, $name, $username, $password, $salt, $email, $language, $code)
Create or update the entities table for a given user.
 
is_group_member($group_guid, $user_guid)
Return whether a given user is a member of the group or not.
 
elgg_register_annotation_url_handler($extender_name="all", $function_name)
Register an annotation url handler.
 
remove_site_object($site_guid, $object_guid)
Remove an object from a site.
 
leave_group($group_guid, $user_guid)
Remove a user from a group.
 
get_access_sql_suffix($table_prefix='', $owner=null)
Returns the SQL where clause for a table with access_id and enabled columns.
 
get_todays_entities_from_relationship($relationship, $relationship_guid, $inverse_relationship=false, $type="", $subtype="", $owner_guid=0, $order_by="", $limit=10, $offset=0, $count=false, $site_guid=0)
Get entities for today from a relationship.
 
get_day_start($day=null, $month=null, $year=null)
Return a timestamp for the start of a given day (defaults today).
 
elgg_register_entity_url_handler($entity_type, $entity_subtype, $function_name)
Sets the URL handler for a particular entity type and subtype.
 
list_user_friends_objects($user_guid, $subtype="", $limit=10, $full_view=true, $listtypetoggle=true, $pagination=true, $timelower=0, $timeupper=0)
Displays a list of a user's friends' objects of a particular subtype, with navigation.
 
export_metadata_plugin_hook($hook, $entity_type, $returnvalue, $params)
Handler called by trigger_plugin_hook on the "export" event.
 
make_attachment($guid_one, $guid_two)
Function to start the process of attaching one object to another.
 
unregister_entity_type($type, $subtype)
Unregisters an entity type and subtype as a public-facing type.
 
execute_delayed_query($query, $dblink, $handler="")
Queue a query for execution upon shutdown.
 
count_user_friends_objects($user_guid, $subtype=ELGG_ENTITIES_ANY_VALUE, $timelower=0, $timeupper=0)
Counts the number of objects owned by a user's friends.
 
add_uuid_to_guid($guid, $uuid)
Tag a previously created guid with the uuid it was imported on.
 
add_to_river($view, $action_type, $subject_guid, $object_guid, $access_id="", $posted=0, $annotation_id=0, $target_guid=0)
Adds an item to the river.
 
export_relationship_plugin_hook($hook, $entity_type, $returnvalue, $params)
Handler called by trigger_plugin_hook on the "export" event.
 
elgg_geocode_location($location)
Encode a location into a latitude and longitude, caching the result.
 
serialise_object_to_xml($data, $name="", $n=0)
This function serialises an object recursively into an XML representation.
 
add_object_to_group($group_guid, $object_guid)
Add an object to the given group.
 
import_extender_plugin_hook($hook, $entity_type, $returnvalue, $params)
Handler called by trigger_plugin_hook on the "import" event.
 
get_user_friends_of($user_guid, $subtype=ELGG_ENTITIES_ANY_VALUE, $limit=10, $offset=0)
Obtains the people who have made a given user a friend.
 
list_notable_entities($start_time, $end_time, $type="", $subtype="", $owner_guid=0, $limit=10, $fullview=true, $listtypetoggle=false, $navigation=true)
Returns a viewable list of entities for a given time period.
 
delete_entity($guid, $recursive=true)
Delete an entity.
 
full_url()
Return the full URL of the current page.
 
get_metastring($id)
When given an ID, returns the corresponding metastring.
 
elgg_register_extender_url_handler($extender_type, $extender_name, $function_name)
Sets the URL handler for a particular extender type and name.
 
get_user_friends_objects($user_guid, $subtype=ELGG_ENTITIES_ANY_VALUE, $limit=10, $offset=0, $timelower=0, $timeupper=0)
Obtains a list of objects owned by a user's friends.
 
unregister_service_handler($handler)
Remove a web service To replace a web service handler, register the desired handler over the old on w...
 
unexpose_function($method)
Unregister a web services method.
 
get_object_sites($object_guid, $limit=10, $offset=0)
Get the sites this object is part of.
 
elgg_list_entities_from_location(array $options=array())
Returns a viewable list of entities from location.
 
get_version($humanreadable=false)
Get the current Elgg version information.
 
elgg_filepath_cache_save($type, $data)
@access private
 
get_metastring_id($string, $case_sensitive=TRUE)
Return the meta string id for a given tag, or false.
 
get_site_domain($guid)
Retrieve a site and return the domain portion of its url.
 
is_uuid_this_domain($uuid)
Test to see if a given uuid is for this domain, returning true if so.
 
expose_function($method, $function, array $parameters=NULL, $description="", $call_method="GET", $require_api_auth=false, $require_user_auth=false)
Register a function as a web service method.
 
generate_tag_cloud(array $tags, $buckets=6)
This function generates an array of tags with a weighting.
 
remove_notification_interest($user_guid, $author_guid)
Remove a 'notify' relationship between the user and a content author.
 
get_user_friends($user_guid, $subtype=ELGG_ENTITIES_ANY_VALUE, $limit=10, $offset=0)
Obtains a given user's friends.
 
get_extender_url(\ElggExtender $extender)
Get the URL of a given elgg extender.
 
remove_object_from_group($group_guid, $object_guid)
Remove an object from the given group.
 
elgg_invalidate_metadata_cache($action, array $options)
Invalidate the metadata cache based on options passed to various *_metadata functions.
 
can_edit_entity_metadata($entity_guid, $user_guid=0, $metadata=null)
Returns if $user_guid can edit the metadata on $entity_guid.
 
get_day_end($day=null, $month=null, $year=null)
Return a timestamp for the end of a given day (defaults today).
 
elgg_get_views($dir, $base)
Returns the name of views for in a directory.
 
get_todays_entities_from_metadata($meta_name, $meta_value="", $entity_type="", $entity_subtype="", $owner_guid=0, $limit=10, $offset=0, $order_by="", $site_guid=0, $count=false)
Get entities for today from metadata.
 
get_annotation_url($id)
Get the URL for this annotation.
 
add_site_object($site_guid, $object_guid)
Add an object to a site.
 
create_object_entity($guid, $title, $description)
Create or update the extras table for a given object.
 
create_site_entity($guid, $name, $description, $url)
Create or update the entities table for a given site.
 
get_entity_from_uuid($uuid)
This function attempts to retrieve a previously imported entity via its UUID.
 
elgg_register_metadata_url_handler($extender_name, $function)
Register a metadata url handler.
 
elgg_filepath_cache_reset()
@access private
 
setup_db_connections()
Establish database connections.
 
calculate_tag_size($min, $max, $number_of_tags, $buckets=6)
The algorithm working out the size of font based on the number of tags.
 
add_site_user($site_guid, $user_guid)
Add a user to a site.
 
elgg_get_calling_plugin_id($mainfilename=false)
Get the name of the most recent plugin to be called in the call stack (or the plugin that owns the cu...
 
already_attached($guid_one, $guid_two)
Function to determine if the object trying to attach to other, has already done so.
 
elgg_regenerate_simplecache($viewtype=NULL)
Regenerates the simple cache.
 
get_attachments($guid, $type="")
Function to get all objects attached to a particular object.
 
elgg_register_relationship_url_handler($relationship_type, $function_name)
Sets the URL handler for a particular relationship type.
 
import_entity_plugin_hook($hook, $entity_type, $returnvalue, $params)
Import an entity.
 
user_remove_friend($user_guid, $friend_guid)
Removes a user from another user's friends list.
 
register_notification_interest($user_guid, $author_guid)
Establish a 'notify' relationship between the user and a content author.
 
list_todays_entities($type="", $subtype="", $owner_guid=0, $limit=10, $fullview=true, $listtypetoggle=false, $navigation=true)
Return a list of today's entities.
 
elgg_get_calling_plugin_entity()
Returns the \ElggPlugin entity of the last plugin called.
 
get_notable_entities_from_metadata($start_time, $end_time, $meta_name, $meta_value="", $entity_type="", $entity_subtype="", $owner_guid=0, $limit=10, $offset=0, $order_by="", $site_guid=0, $count=false)
Return the notable entities for a given time period based on an item of metadata.
 
oddentity_to_elggentity(ODDEntity $element)
Utility function used by import_entity_plugin_hook() to process an ODDEntity into an unsaved \ElggEnt...
 
disable_entity($guid, $reason="", $recursive=true)
Disable an entity.
 
get_todays_entities($type="", $subtype="", $owner_guid=0, $order_by="", $limit=10, $offset=0, $count=false, $site_guid=0, $container_guid=null)
Get all entities for today.
 
register_notification_handler($method, $handler, $params=NULL)
This function registers a handler for a given notification type (eg "email")
 
elgg_disable_filepath_cache()
@access private
 
elgg_enable_filepath_cache()
@access private
 
get_user_sites($user_guid, $limit=10, $offset=0)
Get the sites this user is part of.
 
get_group_members($group_guid, $limit=10, $offset=0, $site_guid=0, $count=false)
Return a list of this group's members.
 
exportAsArray($guid)
Exports an entity as an array.
 
ODD_Export(ODDDocument $document)
Export an ODD Document.
 
oddmetadata_to_elggextender(\ElggEntity $entity, ODDMetaData $element)
Utility function used by import_extender_plugin_hook() to process an ODDMetaData and add it to an ent...
 
register_service_handler($handler, $function)
Registers a web services handler.
 
elgg_filepath_cache_load($type)
@access private
 
import_relationship_plugin_hook($hook, $entity_type, $returnvalue, $params)
Handler called by trigger_plugin_hook on the "import" event.
 
join_group($group_guid, $user_guid)
Join a user to a group.
 
xml_to_object($xml)
Parse an XML file into an object.
 
get_users_membership($user_guid)
Return all groups a user is a member of.
 
serialise_array_to_xml(array $data, $n=0)
Serialise an array.
 
object_notifications($event, $object_type, $object)
Automatically triggered notification on 'create' events that looks at registered objects and attempts...
 
can_edit_entity($entity_guid, $user_guid=0)
Returns if $user_guid is able to edit $entity_guid.
 
export_annotation_plugin_hook($hook, $type, $returnvalue, $params)
Export the annotations for the specified entity.
 
sanitise_string_special($string, $extra_escapeable='')
Sanitise a string for database use, but with the option of escaping extra characters.
 
get_site_objects($site_guid, $subtype="", $limit=10, $offset=0)
Get the objects belonging to a site.
 
_process_element(ODD $odd)
This function processes an element, passing elements to the plugin stack to see if someone will proce...
 
can_edit_extender($extender_id, $type, $user_guid=0)
Determines whether or not the specified user can edit the specified piece of extender.
 
optimize_table($table)
Optimize a table.
 
elgg_get_entities_from_location(array $options=array())
Return entities within a given geographic area.
 
enable_entity($guid, $recursive=true)
Enable an entity.
 
elgg_view_tree($view_root, $viewtype="")
Returns all views below a partial view.
 
unregister_notification_handler($method)
This function unregisters a handler for a given notification type (eg "email")
 
guid_to_uuid($guid)
Generate a UUID from a given GUID.
 
register_notification_object($entity_type, $object_subtype, $language_name)
Register an entity type and subtype to be eligible for notifications.
 
autop($string)
Create paragraphs from text with line spacing.
 
_export_init()
Register the OpenDD import action.
 
volatile_data_export_plugin_hook($hook, $entity_type, $returnvalue, $params)
Exports attributes generated on the fly (volatile) about an entity.
 
elgg_get_filepath_cache()
@access private
 
export($guid)
Export a GUID.
 
get_noteable_entities_from_relationship($start_time, $end_time, $relationship, $relationship_guid, $inverse_relationship=false, $type="", $subtype="", $owner_guid=0, $order_by="", $limit=10, $offset=0, $count=false, $site_guid=0)
Return the notable entities for a given time period based on their relationship.
 
get_relationship_url($id)
Get the url for a given relationship.
 
user_add_friend($user_guid, $friend_guid)
Adds a user to another user's friends list.
 
get_db_link($dblinktype)
Returns (if required, also creates) a database link resource.
 
const ELGG_ENTITIES_ANY_VALUE
 
elgg_trigger_event($event, $object_type, $object=null)
 
elgg_get_version($human_readable=false)
Get the current Elgg version information.
 
elgg_trigger_plugin_hook($hook, $type, $params=null, $returnvalue=null)
 
elgg_deprecated_notice($msg, $dep_version, $backtrace_level=1)
Log a notice about deprecated use of a function, view, etc.
 
access_get_show_hidden_status()
Return current status of showing disabled entities.
 
access_show_hidden_entities($show_hidden)
Show or hide disabled entities.
 
elgg_check_access_overrides($user_guid=0)
Decides if the access system should be ignored for a user.
 
remove_user_from_access_collection($user_guid, $collection_id)
Removes a user from an access collection.
 
get_user_access_collections($owner_guid, $site_guid=0)
Returns an array of database row objects of the access collections owned by $owner_guid.
 
_elgg_get_access_where_sql(array $options=array())
Returns the SQL where clause for enforcing read access to data.
 
elgg_admin_notice_exists($id)
Check if an admin notice is currently active.
 
elgg_add_admin_notice($id, $message)
Write a persistent message to the admin view.
 
sanitise_string($string)
Wrapper function for alternate English spelling (.
 
update_data($query)
Update a row in the database.
 
insert_data($query)
Insert a row into the database.
 
get_data_row($query, $callback="")
Retrieve a single row from the database.
 
execute_delayed_write_query($query, $handler="")
Queue a query for running during shutdown that writes to the database.
 
get_data($query, $callback="")
Retrieve rows from the database.
 
elgg_get_plugin_from_id($plugin_id)
Returns an \ElggPlugin object with the path $path.
 
elgg_create_river_item(array $options=array())
Adds an item to the river.
 
elgg_list_entities(array $options=array(), $getter='elgg_get_entities', $viewer='elgg_view_entity_list')
Returns a string of rendered entities.
 
get_entity($guid)
Loads and returns an entity object from a guid.
 
get_subtype_class($type, $subtype)
Return the class name for a registered type and subtype.
 
get_entity_as_row($guid)
Returns a database row from the entities table.
 
get_subtype_id($type, $subtype)
Return the id for a given subtype.
 
elgg_unregister_entity_type($type, $subtype=null)
Unregisters an entity type and subtype as a public-facing type.
 
is_memcache_available()
Return true if memcache is available and configured.
 
elgg_unregister_notification_method($name)
Unregister a delivery method for notifications.
 
elgg_register_notification_method($name)
Register a delivery method for notifications.
 
elgg_register_notification_event($object_type, $object_subtype, array $actions=array())
Register a notification event.
 
elgg_autop($string)
Create paragraphs from text with line spacing.
 
if($screenshots) $description
 
elgg_list_entities_from_relationship(array $options=array())
Returns a viewable list of entities by relationship.
 
get_entity_relationships($guid, $inverse_relationship=false)
Get all the relationships for a given GUID.
 
get_relationship($id)
Get a relationship by its ID.
 
elgg_get_entities_from_relationship($options)
Return entities matching a given query joining against a relationship.
 
add_entity_relationship($guid_one, $relationship, $guid_two)
Create a relationship between two entities.
 
remove_entity_relationship($guid_one, $relationship, $guid_two)
Delete a relationship between two entities.
 
check_entity_relationship($guid_one, $relationship, $guid_two)
Check if a relationship exists between two entities.
 
elgg_get_logged_in_user_guid()
Return the current logged in user by guid.
 
elgg_get_logged_in_user_entity()
Return the current logged in user, or null if no user is logged in.
 
elgg_is_logged_in()
Returns whether or not the user is currently logged in.
 
if(file_exists($welcome)) $vars
 
get_user($guid)
Get a user object from a GUID.
 
ui datepicker calendar ui state default
 
elgg_get_viewtype()
Return the current view type.
 
elgg_view_entity(\ElggEntity $entity, $vars=array(), $bypass=false, $debug=false)
Returns a string of a rendered entity.
 
elgg_set_viewtype($viewtype="")
Manually set the viewtype.
 
elgg_view_entity_list($entities, $vars=array(), $offset=0, $limit=null, $full_view=true, $list_type_toggle=true, $pagination=true)
Returns a rendered list of entities with pagination.