This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function viewExit(array $context, $status_code = 200, $template = false) | |
| { | |
| call_integration_hook('integrate_pre_view_exit', array(&$context, &$status_code, &$template)); | |
| switch ($GLOBALS['output_strategy']) | |
| { | |
| case 'json': | |
| $content_type = 'text/json'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Check if a user can see a board based on the board groups | |
| * A PHP equivalent to {query_see_board} | |
| * | |
| * @param array $board_groups | |
| * @param array $board_deny_groups (optional) | |
| * @return boolean | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function membergroupsById($group_id, $limit = 1, $detailed = false, $assignable = false, $protected = false) | |
| { | |
| global $context; | |
| if (!isset($group_id)) | |
| return false; | |
| if (empty($context['membergroups'])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Load all of the membergroups | |
| * | |
| * @global array $smcFunc | |
| * @global array $context | |
| * @global array $modSettings | |
| */ | |
| function loadMemberGroups($force = false) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * An interface for caches to implement | |
| */ | |
| interface iCache | |
| { | |
| public function connect(); | |
| public function setOptions($options); | |
| public function getKey($key, $parameters); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Delete from one|multiple tables in the database | |
| * | |
| * @param string $identifier = '' | |
| * @param array|string $tables | |
| * @param string $where | |
| * @param array $options = array() | |
| * @param resource $connection = null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function toggleTopicSticky($topics) | |
| { | |
| global $smcFunc; | |
| $topics = is_array($topics) ? $topics : array($topics); | |
| $smcFunc['db_query']('', ' | |
| UPDATE {db_prefix}topics |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Update a row in multiple tables in the database | |
| * | |
| * @param string $identifier = '' | |
| * @param array|string $tables | |
| * @param array $columns | |
| * @param array $options = array() | |
| * @param resource $connection = null | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!-- | |
| This is the schema for places (to be used for autocomplete) | |
| Here are some more reference links: | |
| https://github.com/wikimedia/mediawiki-extensions-WikibaseSolr/blob/master/schema.solr4.xml | |
| --> | |
| <schema name="places.solr.schema" version="1.5"> | |
| <types> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Should match: | |
| $string = 'somerset nj'; | |
| $string = 'nj somerset'; | |
| $string = 'nj'; | |
| $string = 'NJ '; | |
| // Should NOT match | |
| $string = 'somersetnj'; |