aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/metastrings.php
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2011-11-18 07:32:27 +0100
committerSem <sembrestels@riseup.net>2011-11-18 07:32:27 +0100
commite53d410129701ea1c9d19529afa493f11b5f5b70 (patch)
treed9963b24bf8932654b4a47e36602c75975e50dba /engine/lib/metastrings.php
parent377da25d2965c64941f83baae119fc970ec60982 (diff)
parent08a962c98e2923724f8013d6eaae89101243752a (diff)
downloadelgg-e53d410129701ea1c9d19529afa493f11b5f5b70.tar.gz
elgg-e53d410129701ea1c9d19529afa493f11b5f5b70.tar.bz2
Merge github.com:Elgg/Elgg
Conflicts: engine/lib/input.php
Diffstat (limited to 'engine/lib/metastrings.php')
-rw-r--r--engine/lib/metastrings.php22
1 files changed, 13 insertions, 9 deletions
diff --git a/engine/lib/metastrings.php b/engine/lib/metastrings.php
index d444121d0..9dccec700 100644
--- a/engine/lib/metastrings.php
+++ b/engine/lib/metastrings.php
@@ -161,6 +161,7 @@ function add_metastring($string, $case_sensitive = true) {
* Delete any orphaned entries in metastrings. This is run by the garbage collector.
*
* @return bool
+ * @access private
*/
function delete_orphaned_metastrings() {
global $CONFIG;
@@ -360,9 +361,6 @@ function elgg_get_metastring_based_objects($options) {
$wheres[] = elgg_get_guid_based_where_sql('n_table.owner_guid',
$options['metastring_owner_guids']);
- // remove identical where clauses
- $wheres = array_unique($wheres);
-
// see if any functions failed
// remove empty strings on successful functions
foreach ($wheres as $i => $where) {
@@ -373,6 +371,9 @@ function elgg_get_metastring_based_objects($options) {
}
}
+ // remove identical where clauses
+ $wheres = array_unique($wheres);
+
// evaluate join clauses
if (!is_array($options['joins'])) {
$options['joins'] = array($options['joins']);
@@ -504,6 +505,7 @@ function elgg_get_metastring_based_objects($options) {
* @param bool $case_sensitive Should name and values be case sensitive?
*
* @return array
+ * @access private
*/
function elgg_get_metastring_sql($table, $names = null, $values = null,
$pairs = null, $ids = null, $case_sensitive = false) {
@@ -611,9 +613,9 @@ function elgg_get_metastring_sql($table, $names = null, $values = null,
* corresponding metastrings name.
*
* @param array $options An options array
- * @since 1.8
- * @access private
+ * @since 1.8.0
* @return array
+ * @access private
*/
function elgg_normalize_metastrings_options(array $options = array()) {
@@ -665,7 +667,7 @@ function elgg_normalize_metastrings_options(array $options = array()) {
* @param string $type The type of table to use: metadata or anntations
*
* @return bool
- * @since 1.8
+ * @since 1.8.0
* @access private
*/
function elgg_set_metastring_based_object_enabled_by_id($id, $enabled, $type) {
@@ -718,8 +720,8 @@ function elgg_set_metastring_based_object_enabled_by_id($id, $enabled, $type) {
* @param array $options An options array. {@See elgg_get_metastring_based_objects()}
* @param string $callback The callback to pass each result through
* @return mixed
+ * @since 1.8.0
* @access private
- * @since 1.8
*/
function elgg_batch_metastring_based_objects(array $options, $callback) {
if (!$options || !is_array($options)) {
@@ -739,7 +741,7 @@ function elgg_batch_metastring_based_objects(array $options, $callback) {
* @param string $type The type: annotation or metadata
* @return mixed
*
- * @since 1.8
+ * @since 1.8.0
* @access private
*/
function elgg_get_metastring_based_object_from_id($id, $type) {
@@ -769,7 +771,7 @@ function elgg_get_metastring_based_object_from_id($id, $type) {
* @param string $type The object's metastring type: annotation or metadata
* @return bool
*
- * @since 1.8
+ * @since 1.8.0
* @access private
*/
function elgg_delete_metastring_based_object_by_id($id, $type) {
@@ -827,6 +829,7 @@ function elgg_delete_metastring_based_object_by_id($id, $type) {
*
* @return array
* @since 1.7.0
+ * @access private
*/
function elgg_entities_get_metastrings_options($type, $options) {
$valid_types = array('metadata', 'annotation');
@@ -891,6 +894,7 @@ elgg_register_plugin_hook_handler('unit_test', 'system', 'metastrings_test');
* @param mixed $params Params
*
* @return array
+ * @access private
*/
function metastrings_test($hook, $type, $value, $params) {
global $CONFIG;