Example #1
0
/**
 * Vouchers plugin initialization functions.
 */
function vouchers_init()
{
    // register a library of helper functions
    elgg_register_library('elgg:vouchers', elgg_get_plugins_path() . 'vouchers/lib/vouchers.php');
    // Register subtype
    run_function_once('vouchers_manager_run_once_subtypes');
    // Register entity_type for search
    elgg_register_entity_type('object', Voucher::SUBTYPE);
    // Site navigation
    $item = new ElggMenuItem('vouchers', elgg_echo('vouchers:menu'), 'vouchers/all');
    elgg_register_menu_item('site', $item);
    // Extend CSS
    elgg_extend_view('css/elgg', 'vouchers/css');
    elgg_register_css('vouchers_tooltip_css', '//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css');
    // Extend js
    elgg_register_js('vouchersjs', elgg_get_site_url() . 'mod/vouchers/assets/vouchers.js');
    elgg_register_js('vouchers_tooltip_js', '//code.jquery.com/ui/1.11.1/jquery-ui.js');
    // Register a page handler, so we can have nice URLs
    elgg_register_page_handler('vouchers', 'vouchers_page_handler');
    // Register a URL handler for voucher
    $release = get_version(true);
    // Register a URL handler for agora
    if ($release < 1.9) {
        // version 1.8
        elgg_register_entity_url_handler('object', 'vouchers', 'voucher_url');
    } else {
        // use this since Elgg 1.9
        elgg_register_plugin_hook_handler('entity:url', 'object', 'vouchers_set_url');
    }
    // Register menu item to an ownerblock
    elgg_register_plugin_hook_handler('register', 'menu:owner_block', 'vouchers_owner_block_menu');
    // Register admin transaction log menu under "Utilities"
    elgg_register_admin_menu_item('administer', 'vouchers_transactions_log', 'administer_utilities');
    // register plugin hooks
    elgg_register_plugin_hook_handler("public_pages", "walled_garden", "vouchers_walled_garden_hook");
    // Register actions
    $action_path = elgg_get_plugins_path() . 'vouchers/actions';
    elgg_register_action("vouchers/addvoucher", "{$action_path}/addvoucher.php");
    elgg_register_action("vouchers/delete", "{$action_path}/delvoucher.php");
    elgg_register_action("vouchers/set_featured", "{$action_path}/vouchers/set_featured.php");
    // set a voucher post as featured
    elgg_register_action("vouchers/unset_featured", "{$action_path}/vouchers/unset_featured.php");
    // unset a voucher post from featured
    elgg_register_action("vouchers/get_with_points", "{$action_path}/vouchers/get_with_points.php");
    // voucher purchase with points only
    elgg_register_action('vouchers/be_interested', "{$action_path}/be_interested.php");
    // send interest
    elgg_register_action("vouchers/usersettings", "{$action_path}/usersettings.php");
    // save user settings
    // extend group main page
    elgg_extend_view('groups/tool_latest', 'vouchers/group_module');
    //elgg_extend_view("print", "printpreview/pageshell/pageshell");
    // add the group vouchers tool option
    add_group_tool_option('vouchers', elgg_echo('vouchers:group:enablevouchers'), true);
    // Add vouchers widgets
    elgg_register_widget_type('vouchers', elgg_echo('vouchers:widget'), elgg_echo('vouchers:widget:description'), 'profile,groups,dashboard');
    // member's voucher posts
    elgg_register_widget_type('vouchers_featured', elgg_echo('vouchers:widget:featured'), elgg_echo('vouchers:widget:featured:description'), 'dashboard');
    // featured vouchers for dashboard
}
/**
 * Handles the sending of notifications when replied on group forum topic
 *
 * @param string         $event      the name of the event
 * @param string         $type       the type of the event
 * @param ElggAnnotation $annotation the supplied ElggAnnotation
 *
 * @return void
 */
function advanced_notifications_create_annotation_event_handler($event, $type, $annotation)
{
    if (!empty($annotation) && $annotation instanceof ElggAnnotation) {
        // is this an annotation on which notifications should be sent
        if (advanced_notifications_is_registered_notification_annotation($annotation)) {
            // check if the entity isn't PRIVATE
            $entity = $annotation->getEntity();
            if (!empty($entity) && $entity->access_id != ACCESS_PRIVATE) {
                // is the entity a registered notification entity
                if (advanced_notifications_is_registered_notification_entity($entity)) {
                    // prepare to call the commandline
                    $commandline_options = array("event" => $event, "type" => $type, "id" => $annotation->id);
                    // in older versions of elgg do this differently
                    if (version_compare(get_version(true), "1.8.6", "<")) {
                        $entity = $annotation->getEntity();
                        unset($commandline_options["id"]);
                        $commandline_options["type"] = $entity->getType();
                        $commandline_options["guid"] = $entity->getGUID();
                        $commandline_options["input"] = "group_topic_post|" . base64_encode($annotation->value);
                    }
                    advanced_notifications_start_commandline($commandline_options);
                }
            }
        }
    }
}
Example #3
0
function polls_init()
{
    elgg_register_library('elgg:polls', elgg_get_plugins_path() . 'polls/models/model.php');
    // Set up menu for logged in users
    if (elgg_is_logged_in()) {
        $item = new ElggMenuItem('polls', elgg_echo('polls'), 'polls/owner/' . elgg_get_logged_in_user_entity()->username);
    } else {
        $item = new ElggMenuItem('polls', elgg_echo('poll'), 'polls/all');
    }
    elgg_register_menu_item('site', $item);
    // Extend system CSS with our own styles, which are defined in the polls/css view
    elgg_extend_view('css/elgg', 'polls/css');
    // Extend hover-over menu
    elgg_extend_view('profile/menu/links', 'polls/menu');
    // Register a page handler, so we can have nice URLs
    elgg_register_page_handler('polls', 'polls_page_handler');
    // Register a URL handler for poll posts
    elgg_register_entity_url_handler('object', 'poll', 'polls_url');
    // notifications
    $elgg_version = explode('.', get_version(true));
    if ($elgg_version[1] > 8) {
        $send_notification = elgg_get_plugin_setting('send_notification', 'polls');
        if (!$send_notification || $send_notification != 'no') {
            elgg_register_notification_event('object', 'poll');
            elgg_register_plugin_hook_handler('prepare', 'notification:create:object:poll', 'polls_prepare_notification');
        }
    }
    // add link to owner block
    elgg_register_plugin_hook_handler('register', 'menu:owner_block', 'polls_owner_block_menu');
    elgg_register_plugin_hook_handler('widget_url', 'widget_manager', 'polls_widget_url_handler');
    // Register entity type
    elgg_register_entity_type('object', 'poll');
    // register the JavaScript
    $js = elgg_get_simplecache_url('js', 'polls/js');
    elgg_register_simplecache_view('js/polls/js');
    elgg_register_js('elgg.polls', $js);
    // add group widget
    $group_polls = elgg_get_plugin_setting('group_polls', 'polls');
    if (!$group_polls || $group_polls != 'no') {
        elgg_extend_view('groups/tool_latest', 'polls/group_module');
    }
    if (!$group_polls || $group_polls == 'yes_default') {
        add_group_tool_option('polls', elgg_echo('polls:enable_polls'), TRUE);
    } else {
        if ($group_polls == 'yes_not_default') {
            add_group_tool_option('polls', elgg_echo('polls:enable_polls'), FALSE);
        }
    }
    //add widgets
    elgg_register_widget_type('poll', elgg_echo('polls:my_widget_title'), elgg_echo('polls:my_widget_description'), "profile,groups");
    elgg_register_widget_type('latestPolls', elgg_echo('polls:latest_widget_title'), elgg_echo('polls:latest_widget_description'), "index,profile,dashboard,groups");
    elgg_register_widget_type('poll_individual', elgg_echo('polls:individual'), elgg_echo('poll_individual_group:widget:description'), "index,profile,dashboard,groups");
    // Register actions
    $action_path = elgg_get_plugins_path() . 'polls/actions/polls';
    elgg_register_action("polls/add", "{$action_path}/add.php");
    elgg_register_action("polls/edit", "{$action_path}/edit.php");
    elgg_register_action("polls/delete", "{$action_path}/delete.php");
    elgg_register_action("polls/vote", "{$action_path}/vote.php");
}
Example #4
0
/**
 * Generate a basic report.
 *
 * @return string
 */
function diagnostics_basic_hook($hook, $entity_type, $returnvalue, $params)
{
    // Get version information
    $version = get_version();
    $release = get_version(true);
    $returnvalue .= elgg_echo('diagnostics:report:basic', array($release, $version));
    return $returnvalue;
}
/**
 * Generate a basic report.
 *
 * @param unknown_type $hook
 * @param unknown_type $entity_type
 * @param unknown_type $returnvalue
 * @param unknown_type $params
 */
function diagnostics_basic_hook($hook, $entity_type, $returnvalue, $params)
{
    global $CONFIG;
    // Get version information
    $version = get_version();
    $release = get_version(true);
    $returnvalue .= sprintf(elgg_echo('diagnostics:report:basic'), $release, $version);
    return $returnvalue;
}
/**
 * Run once and only once.
 * 
 * @param ElggSite $site The site who's information to use
 */
function ping_home(ElggSite $site)
{
    global $NOTIFICATION_SERVER, $CONFIG;
    // Get version information
    $version = get_version();
    $release = get_version(true);
    // Get export
    $export = export($site->guid);
    return send_api_post_call($NOTIFICATION_SERVER, array('method' => 'elgg.system.ping', 'url' => $site->url, 'version' => $version, 'release' => $release), array(), $export, 'text/xml');
}
/**
 * Determine if we're running elgg 1.8 or newer
 * @return boolean
 */
function is_elgg18()
{
    static $is_elgg18;
    if ($is_elgg18 !== null) {
        return $is_elgg18;
    }
    if (is_callable('elgg_get_version')) {
        return false;
        // this is newer than 1.8
    }
    $is_elgg18 = strpos(get_version(true), '1.8') === 0;
    return $is_elgg18;
}
Example #8
0
/**
 * Exports plugins and their configuration
 */
function transfer_plugins_export()
{
    // metadata
    $info = array('elgg_version' => get_version(true), 'elgg_release' => get_version(false), 'transfer_plugins_format' => TRANSFER_PLUGINS_FORMAT);
    $info['plugins'] = array();
    $plugins = elgg_get_plugins('all');
    foreach ($plugins as $plugin) {
        if (is_object($plugin) && is_object($plugin->getManifest())) {
            $plugin_info = array('id' => $plugin->getID(), 'version' => $plugin->getManifest()->getVersion(), 'active' => (bool) $plugin->isActive(), 'settings' => $plugin->getAllSettings(), 'priority' => $plugin->getPriority());
        }
        $plugin_order[$plugin->getPriority() * 10] = $plugin->getID();
        $info['plugins'][] = $plugin_info;
    }
    $info['17_pluginorder'] = serialize($plugin_order);
    return serialize($info);
}
function get_version_number()
{
    $r = 'v';
    $v = get_version();
    $pos = strpos($v, ' ', 0);
    if ($pos === false) {
        my_die('Wrong version: ' . $v);
    }
    $vn = preg_split("/[.]/", substr($v, 0, $pos));
    if (count($vn) < 3) {
        my_die('Wrong version: ' . $v);
    }
    for ($i = 0; $i < 3; $i++) {
        $r .= substr('000' . $vn[$i], -3);
    }
    return $r;
    // 'vxxxyyyzzz' wenn version = x.y.z
}
header("Content-Type: text/plain");
?>
#!/bin/sh

BASEURL="<?php 
echo (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . conf('subdirectory');
?>
"
TPL_BASE="${BASEURL}/assets/client_installer/"
MUNKIPATH="/usr/local/munki/" # TODO read munkipath from munki config
PREFPATH="/Library/Preferences/MunkiReport"
CURL="/usr/bin/curl --insecure --fail --silent  --show-error"
# Exit status
ERR=0
VERSION="<?php 
echo get_version();
?>
"

echo "BaseURL is ${BASEURL}"

echo "Retrieving munkireport scripts"

cd ${MUNKIPATH}
$CURL "${TPL_BASE}{preflight,postflight,report_broken_client}" --remote-name --remote-name --remote-name \
	&& $CURL "${TPL_BASE}reportcommon" -o "${MUNKIPATH}munkilib/reportcommon.py" \
	&& $CURL "${TPL_BASE}phpserialize" -o "${MUNKIPATH}munkilib/phpserialize.py"

if [ "${?}" != 0 ]
then
	echo "Failed to download all required components!"
Example #11
0
<?php

define('VERSION_STATIC', '1.14');
function get_version()
{
    date_default_timezone_set('UTC');
    $root_dir = dirname(dirname(__FILE__));
    if (is_dir("{$root_dir}/.git") && file_exists("{$root_dir}/.git/refs/heads/master")) {
        $suffix = substr(trim(file_get_contents("{$root_dir}/.git/refs/heads/master")), 0, 7);
        return VERSION_STATIC . ".{$suffix}";
    }
    return VERSION_STATIC;
}
define('VERSION', get_version());
/**
 * Upgrades Elgg
 *
 */
function version_upgrade()
{
    $dbversion = (int) datalist_get('version');
    // No version number? Oh snap...this is an upgrade from a clean installation < 1.7.
    // Run all upgrades without error reporting and hope for the best.
    // See http://trac.elgg.org/elgg/ticket/1432 for more.
    $quiet = !$dbversion;
    // Upgrade database
    if (db_upgrade($dbversion, '', $quiet)) {
        system_message(elgg_echo('upgrade:db'));
    }
    // Upgrade core
    if (upgrade_code($dbversion, $quiet)) {
        system_message(elgg_echo('upgrade:core'));
    }
    // Now we trigger an event to give the option for plugins to do something
    $upgrade_details = new stdClass();
    $upgrade_details->from = $dbversion;
    $upgrade_details->to = get_version();
    trigger_elgg_event('upgrade', 'upgrade', $upgrade_details);
    // Update the version
    datalist_set('version', get_version());
}
Example #13
0
    if (isset($site_mods[$mod])) {
        if (file_exists(NV_ROOTDIR . "/modules/" . $site_mods[$mod]['module_file'] . "/language/admin_" . NV_LANG_INTERFACE . ".php")) {
            include NV_ROOTDIR . "/modules/" . $site_mods[$mod]['module_file'] . "/language/admin_" . NV_LANG_INTERFACE . ".php";
        } elseif (file_exists(NV_ROOTDIR . "/modules/" . $site_mods[$mod]['module_file'] . "/language/admin_" . NV_LANG_DATA . ".php")) {
            include NV_ROOTDIR . "/modules/" . $site_mods[$mod]['module_file'] . "/language/admin_" . NV_LANG_DATA . ".php";
        } elseif (file_exists(NV_ROOTDIR . "/modules/" . $site_mods[$mod]['module_file'] . "/language/admin_en.php")) {
            include NV_ROOTDIR . "/modules/" . $site_mods[$mod]['module_file'] . "/language/admin_en.php";
        }
    }
    return $lang_module;
}
$info = array();
if (defined('NV_IS_GODADMIN')) {
    $field = array();
    $field[] = array('key' => $lang_module['version_user'], 'value' => $global_config['version']);
    $new_version = get_version(28800);
    //kem tra lai sau 8 tieng
    if ($new_version != false) {
        if (nv_version_compare($global_config['version'], $new_version->version) < 0) {
            $field[] = array('key' => $lang_module['version_news'], 'value' => (string) $new_version->version);
        }
    }
    $caption = "<a href=\"" . NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=settings&amp;" . NV_OP_VARIABLE . "=checkupdate\">" . $lang_module['checkversion'] . "</a>";
    $info[] = array('caption' => $caption, 'field' => $field);
}
foreach ($site_mods as $mod => $value) {
    if (file_exists(NV_ROOTDIR . "/modules/" . $value['module_file'] . "/siteinfo.php")) {
        $siteinfo = array();
        $mod_data = $value['module_data'];
        include NV_ROOTDIR . "/modules/" . $value['module_file'] . "/siteinfo.php";
        if (!empty($siteinfo)) {
<?php

// Disallow direct access to this file for security reasons
if (!defined("IN_MYBB")) {
    die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}
$page->add_breadcrumb_item("CloudFlare Manager", "index.php?module=cloudflare");
$page->add_breadcrumb_item("Change Log", "index.php?module=cloudflare-change_log");
$page->output_header("CloudFlare Manager - Change Log For Version " . get_version());
$version = str_replace(" ", "", get_version());
$changelog = @file_get_contents("http://cf.mybbsecurity.net/changelog/" . $version);
if ($changelog) {
    echo nl2br($changelog);
} else {
    echo "Error: Cannot find change log for version " . get_version() . ".";
}
$page->output_footer();
Example #15
0
/**
 * iZAP izap_videos
 *
 * @package Elgg videotizer, by iZAP Web Solutions.
 * @license GNU Public License version 3
 * @Contact iZAP Team "<*****@*****.**>"
 * @Founder Tarun Jangra "<*****@*****.**>"
 * @link http://www.izap.in/
 * 
 */
$limit = $vars['entity']->num_display;
$limit = $limit ? $limit : 5;
$options['type'] = 'object';
$options['subtype'] = 'izap_videos';
$options['limit'] = $limit;
if ((double) get_version(true) <= 1.6) {
    $videos = get_entities($options['type'], $options['subtype'], 0, '', $options['subtype']);
} else {
    $videos = elgg_get_entities($options);
}
if ($videos) {
    foreach ($videos as $video) {
        echo elgg_view('izap_videos/widgetListing', array('entity' => $video));
    }
}
if (is_old_elgg()) {
    ?>
<script type="text/javascript">
  $(document).ready(function() {
    $(".izap_ajaxed_thumb").click(function() {
      $("#load_video_" + this.rel).attr('style', '');
 /**
  * Returns if the Elgg system meets the plugin's dependency
  * requirements.  This includes both requires and conflicts.
  *
  * Full reports can be requested.  The results are returned
  * as an array of arrays in the form array(
  * 	'type' => requires|conflicts,
  * 	'dep' => array( dependency array ),
  * 	'status' => bool if depedency is met,
  * 	'comment' => optional comment to display to the user.
  * )
  *
  * @param bool $full_report Return a full report.
  * @return bool|array
  */
 public function checkDependencies($full_report = false)
 {
     // Note: $conflicts and $requires are not unused. They're called dynamically
     $requires = $this->getManifest()->getRequires();
     $conflicts = $this->getManifest()->getConflicts();
     $enabled_plugins = elgg_get_plugins('active');
     $this_id = $this->getID();
     $report = array();
     // first, check if any active plugin conflicts with us.
     foreach ($enabled_plugins as $plugin) {
         $temp_conflicts = array();
         $temp_manifest = $plugin->getManifest();
         if ($temp_manifest instanceof ElggPluginManifest) {
             $temp_conflicts = $plugin->getManifest()->getConflicts();
         }
         foreach ($temp_conflicts as $conflict) {
             if ($conflict['type'] == 'plugin' && $conflict['name'] == $this_id) {
                 $result = $this->checkDepPlugin($conflict, $enabled_plugins, false);
                 // rewrite the conflict to show the originating plugin
                 $conflict['name'] = $plugin->getManifest()->getName();
                 if (!$full_report && !$result['status']) {
                     $this->errorMsg = "Conflicts with plugin \"{$plugin->getManifest()->getName()}\".";
                     return $result['status'];
                 } else {
                     $report[] = array('type' => 'conflicted', 'dep' => $conflict, 'status' => $result['status'], 'value' => $this->getManifest()->getVersion());
                 }
             }
         }
     }
     $check_types = array('requires', 'conflicts');
     if ($full_report) {
         // Note: $suggests is not unused. It's called dynamically
         $suggests = $this->getManifest()->getSuggests();
         $check_types[] = 'suggests';
     }
     foreach ($check_types as $dep_type) {
         $inverse = $dep_type == 'conflicts' ? true : false;
         foreach (${$dep_type} as $dep) {
             switch ($dep['type']) {
                 case 'elgg_version':
                     $result = $this->checkDepElgg($dep, get_version(), $inverse);
                     break;
                 case 'elgg_release':
                     $result = $this->checkDepElgg($dep, get_version(true), $inverse);
                     break;
                 case 'plugin':
                     $result = $this->checkDepPlugin($dep, $enabled_plugins, $inverse);
                     break;
                 case 'priority':
                     $result = $this->checkDepPriority($dep, $enabled_plugins, $inverse);
                     break;
                 case 'php_extension':
                     $result = $this->checkDepPhpExtension($dep, $inverse);
                     break;
                 case 'php_ini':
                     $result = $this->checkDepPhpIni($dep, $inverse);
                     break;
             }
             // unless we're doing a full report, break as soon as we fail.
             if (!$full_report && !$result['status']) {
                 $this->errorMsg = "Missing dependencies.";
                 return $result['status'];
             } else {
                 // build report element and comment
                 $report[] = array('type' => $dep_type, 'dep' => $dep, 'status' => $result['status'], 'value' => $result['value']);
             }
         }
     }
     if ($full_report) {
         // add provides to full report
         $provides = $this->getManifest()->getProvides();
         foreach ($provides as $provide) {
             $report[] = array('type' => 'provides', 'dep' => $provide, 'status' => true, 'value' => '');
         }
         return $report;
     }
     return true;
 }
Example #17
0
if (!isset($import_handle)) {
    $import_handle = "";
}
$package_size = 1048576;
switch ($task) {
    case "get_sql":
        get_sql_dump();
        break;
    case "get_sql_file":
        get_sql_file($filename, $position);
        break;
    case "put_sql":
        put_sql($import_handle);
        break;
    case "get_version":
        get_version($version);
        break;
    case "get_config":
        get_config();
        break;
    case "get_category_tree":
        get_category_tree();
        break;
    case "run_indexer":
        run_indexer();
        break;
    case "get_include_tables_exists":
        get_include_tables_exists();
        break;
    case "get_var_from_script":
        echo handle_dirs($vars_main_dir, $vars_names);
Example #18
0
/**
 * This function checks a plugin manifest 'elgg_version' value against the current install
 * returning TRUE if the elgg_version is <= the current install's version.
 * @param $manifest_elgg_version_string The build version (eg 2009010201). 
 * @return bool
 */
function check_plugin_compatibility($manifest_elgg_version_string)
{
    $version = get_version();
    if (strpos($manifest_elgg_version_string, '.') === false) {
        // Using version
        $req_version = (int) $manifest_elgg_version_string;
        return $version >= $req_version;
    }
    return false;
}
Example #19
0
/**
 * Sends a notice about deprecated use of a function, view, etc.
 *
 * This function either displays or logs the deprecation message,
 * depending upon the deprecation policies in {@link CODING.txt}.
 * Logged messages are sent with the level of 'WARNING'. Only admins
 * get visual deprecation notices. When non-admins are logged in, the
 * notices are sent to PHP's log through elgg_dump().
 *
 * A user-visual message will be displayed if $dep_version is greater
 * than 1 minor releases lower than the current Elgg version, or at all
 * lower than the current Elgg major version.
 *
 * @note This will always at least log a warning.  Don't use to pre-deprecate things.
 * This assumes we are releasing in order and deprecating according to policy.
 *
 * @see CODING.txt
 *
 * @param string $msg             Message to log / display.
 * @param string $dep_version     Human-readable *release* version: 1.7, 1.8, ...
 * @param int    $backtrace_level How many levels back to display the backtrace.
 *                                Useful if calling from functions that are called
 *                                from other places (like elgg_view()). Set to -1
 *                                for a full backtrace.
 *
 * @return bool
 * @since 1.7.0
 */
function elgg_deprecated_notice($msg, $dep_version, $backtrace_level = 1)
{
    // if it's a major release behind, visual and logged
    // if it's a 1 minor release behind, visual and logged
    // if it's for current minor release, logged.
    // bugfixes don't matter because we are not deprecating between them
    if (!$dep_version) {
        return false;
    }
    $elgg_version = get_version(true);
    $elgg_version_arr = explode('.', $elgg_version);
    $elgg_major_version = (int) $elgg_version_arr[0];
    $elgg_minor_version = (int) $elgg_version_arr[1];
    $dep_major_version = (int) $dep_version;
    $dep_minor_version = 10 * ($dep_version - $dep_major_version);
    $visual = false;
    if ($dep_major_version < $elgg_major_version || $dep_minor_version < $elgg_minor_version) {
        $visual = true;
    }
    $msg = "Deprecated in {$dep_major_version}.{$dep_minor_version}: {$msg}";
    if ($visual && elgg_is_admin_logged_in()) {
        register_error($msg);
    }
    // Get a file and line number for the log. Never show this in the UI.
    // Skip over the function that sent this notice and see who called the deprecated
    // function itself.
    $msg .= " Called from ";
    $stack = array();
    $backtrace = debug_backtrace();
    // never show this call.
    array_shift($backtrace);
    $i = count($backtrace);
    foreach ($backtrace as $trace) {
        $stack[] = "[#{$i}] {$trace['file']}:{$trace['line']}";
        $i--;
        if ($backtrace_level > 0) {
            if ($backtrace_level <= 1) {
                break;
            }
            $backtrace_level--;
        }
    }
    $msg .= implode("<br /> -> ", $stack);
    elgg_dump($msg, elgg_is_admin_logged_in(), 'WARNING');
    return true;
}
Example #20
0
<?php

/**
 * Elgg ICAL output pageshell
 *
 * @package Elgg
 * @subpackage Core
 *
 */
header("Content-Type: text/calendar");
echo $vars['body'];
?>
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Curverider Ltd//NONSGML Elgg <?php 
echo get_version(true);
?>
//EN
<?php 
echo $vars['body'];
?>
END:VCALENDAR
Example #21
0
/**
 * Sends a notice about deprecated use of a function, view, etc.
 *
 * This function either displays or logs the deprecation message,
 * depending upon the deprecation policies in {@link CODING.txt}.
 * Logged messages are sent with the level of 'WARNING'.
 *
 * A user-visual message will be displayed if $dep_version is greater
 * than 1 minor releases lower than the current Elgg version, or at all
 * lower than the current Elgg major version.
 *
 * @note This will always at least log a warning.  Don't use to pre-deprecate things.
 * This assumes we are releasing in order and deprecating according to policy.
 *
 * @see CODING.txt
 *
 * @param str $msg         Message to log / display.
 * @param str $dep_version Human-readable *release* version: 1.7, 1.7.3
 *
 * @return bool
 * @since 1.7.0
 */
function elgg_deprecated_notice($msg, $dep_version)
{
    // if it's a major release behind, visual and logged
    // if it's a 1 minor release behind, visual and logged
    // if it's for current minor release, logged.
    // bugfixes don't matter because you're not deprecating between them, RIGHT?
    if (!$dep_version) {
        return FALSE;
    }
    $elgg_version = get_version(TRUE);
    $elgg_version_arr = explode('.', $elgg_version);
    $elgg_major_version = (int) $elgg_version_arr[0];
    $elgg_minor_version = (int) $elgg_version_arr[1];
    $dep_major_version = (int) $dep_version;
    $dep_minor_version = 10 * ($dep_version - $dep_major_version);
    $visual = FALSE;
    if ($dep_major_version < $elgg_major_version || $dep_minor_version < $elgg_minor_version) {
        $visual = TRUE;
    }
    $msg = "Deprecated in {$dep_major_version}.{$dep_minor_version}: {$msg}";
    if ($visual) {
        register_error($msg);
    }
    // Get a file and line number for the log. Never show this in the UI.
    // Skip over the function that sent this notice and see who called the deprecated
    // function itself.
    $backtrace = debug_backtrace();
    $caller = $backtrace[1];
    $msg .= " (Called from {$caller['file']}:{$caller['line']})";
    elgg_log($msg, 'WARNING');
    return TRUE;
}
Example #22
0
<?php

include_once "includes/includes.php";
checkauthentication();
$session_name = "Kh41r4";
$p = @$_GET['p'];
$dekripsi = dekripsi($p);
$get = explode("&", $dekripsi);
$p = $get[0];
$errmsg = @$_SESSION['errmsg'];
$slevel = @$_SESSION['xlevel_' . $session_name];
$susername = @$_SESSION['xusername_' . $session_name];
$snama = @$_SESSION['xnama_' . $session_name];
$sunit = @$_SESSION['xunit_' . $session_name];
$title = get_title();
$version = get_version();
$copyright = get_copyright();
$q = ekstrak_get(@$get[1]);
$id = ekstrak_get(@$get[2]);
$NoSurat = ekstrak_get(@$get[3]);
$Perihal = ekstrak_get(@$get[4]);
$BeritaFlag = ekstrak_get(@$get[5]);
$StatusDisposisi = ekstrak_get(@$get[6]);
$kotaksuratlist = 27;
$xlevel = @$_SESSION['xlevel_' . $session_name];
$IdUser = @$_SESSION['xusername_' . $session_name];
$KdSatker = @$_SESSION['xunit_' . $session_name];
?>

<html id="minwidth">
	<head>
Example #23
0
 /**
  * Initialize the site including site entity, plugins, and configuration
  *
  * @param array $submissionVars Submitted vars
  *
  * @return bool
  */
 protected function saveSiteSettings($submissionVars)
 {
     global $CONFIG;
     // ensure that file path, data path, and www root end in /
     $submissionVars['path'] = sanitise_filepath($submissionVars['path']);
     $submissionVars['dataroot'] = sanitise_filepath($submissionVars['dataroot']);
     $submissionVars['wwwroot'] = sanitise_filepath($submissionVars['wwwroot']);
     $site = new ElggSite();
     $site->name = $submissionVars['sitename'];
     $site->url = $submissionVars['wwwroot'];
     $site->access_id = ACCESS_PUBLIC;
     $site->email = $submissionVars['siteemail'];
     $guid = $site->save();
     if (!$guid) {
         register_error(elgg_echo('install:error:createsite'));
         return FALSE;
     }
     // bootstrap site info
     $CONFIG->site_guid = $guid;
     $CONFIG->site = $site;
     datalist_set('installed', time());
     datalist_set('path', $submissionVars['path']);
     datalist_set('dataroot', $submissionVars['dataroot']);
     datalist_set('default_site', $site->getGUID());
     datalist_set('version', get_version());
     datalist_set('simplecache_enabled', 1);
     datalist_set('system_cache_enabled', 1);
     // new installations have run all the upgrades
     $upgrades = elgg_get_upgrade_files($submissionVars['path'] . 'engine/lib/upgrades/');
     datalist_set('processed_upgrades', serialize($upgrades));
     set_config('view', 'default', $site->getGUID());
     set_config('language', 'en', $site->getGUID());
     set_config('default_access', $submissionVars['siteaccess'], $site->getGUID());
     set_config('allow_registration', TRUE, $site->getGUID());
     set_config('walled_garden', FALSE, $site->getGUID());
     set_config('allow_user_default_access', '', $site->getGUID());
     $this->enablePlugins();
     return TRUE;
 }
Example #24
0
/**
 * function to upload a profile icon on register of a user
 * 
 * @param $user
 * @return unknown_type
 */
function add_profile_icon($user)
{
    $topbar = get_resized_image_from_uploaded_file('profile_icon', 16, 16, true);
    $tiny = get_resized_image_from_uploaded_file('profile_icon', 25, 25, true);
    $small = get_resized_image_from_uploaded_file('profile_icon', 40, 40, true);
    $medium = get_resized_image_from_uploaded_file('profile_icon', 100, 100, true);
    $large = get_resized_image_from_uploaded_file('profile_icon', 200, 200);
    $master = get_resized_image_from_uploaded_file('profile_icon', 550, 550);
    $prefix = $user->guid;
    $cur_version = get_version();
    if ($cur_version < 2010071002) {
        $prefix = $user->name;
    }
    if ($small !== false && $medium !== false && $large !== false && $tiny !== false) {
        $filehandler = new ElggFile();
        $filehandler->owner_guid = $user->getGUID();
        $filehandler->setFilename("profile/" . $prefix . "large.jpg");
        $filehandler->open("write");
        $filehandler->write($large);
        $filehandler->close();
        $filehandler->setFilename("profile/" . $prefix . "medium.jpg");
        $filehandler->open("write");
        $filehandler->write($medium);
        $filehandler->close();
        $filehandler->setFilename("profile/" . $prefix . "small.jpg");
        $filehandler->open("write");
        $filehandler->write($small);
        $filehandler->close();
        $filehandler->setFilename("profile/" . $prefix . "tiny.jpg");
        $filehandler->open("write");
        $filehandler->write($tiny);
        $filehandler->close();
        $filehandler->setFilename("profile/" . $prefix . "topbar.jpg");
        $filehandler->open("write");
        $filehandler->write($topbar);
        $filehandler->close();
        $filehandler->setFilename("profile/" . $prefix . "master.jpg");
        $filehandler->open("write");
        $filehandler->write($master);
        $filehandler->close();
        $user->icontime = time();
    }
}
Example #25
0
// Work out number of users
if (!subsite_manager_on_subsite()) {
    $users_stats = get_number_users();
    $total_users = get_number_users(true);
    $users = $users_stats . " " . elgg_echo('active') . " / " . $total_users . " " . elgg_echo('total');
} else {
    $site = elgg_get_site_entity();
    $options = array("type" => "user", "site_guids" => false, "count" => true);
    $users_stats = $site->getMembers($options);
    $users_pending = (int) $site->countMembershipRequests();
    $users = $users_stats . " " . elgg_echo("active") . " / " . $users_pending . " " . elgg_echo('admin:users:membership');
}
// Get version information
$version = get_version();
$release = get_version(true);
?>
<table class="elgg-table-alt">
	<tr class="odd">
		<td><b><?php 
echo elgg_echo('admin:statistics:label:version');
?>
 :</b></td>
		<td><?php 
echo elgg_echo('admin:statistics:label:version:release');
?>
 - <?php 
echo $release;
?>
, <?php 
echo elgg_echo('admin:statistics:label:version:version');
Example #26
0
$version = get_version();
$local_v = mysqli_fetch_array(mysqli_query($con, 'SELECT setting FROM tc_conf WHERE uid=1'))[0];
$file_list = get_update_file();
if (isset($_POST['confirm'])) {
    if (!($version == $local_v)) {
        if ($file_list[0] !== '') {
            $file_content = array();
            for ($i = 0; $i < count($file_list); $i++) {
                $file_content[$i] = get_file_content('https://raw.githubusercontent.com/racaljk/tieba_cloud/master/' . $file_list[$i]);
                $url = dirname(dirname(__FILE__)) . "\\" . str_replace('/', "\\", $file_list[$i]);
                $fp = fopen($url, 'w');
                fwrite($fp, $file_content[$i]);
                fclose($fp);
                $fp_v = fopen('ver.php', 'w');
                $content = '<?php
				define("TC_VER","' . get_version() . '")?>';
                fwrite($fp_v, $content);
                fclose($fp_v);
            }
            header('location:../index.php');
        }
    }
}
?>
<head>	<meta http-equiv="content-type" content="text/html; charset=UTF-8"><meta charset="utf-8">
<title>Tieba Cloud - Update</title><meta name="generator" content="Bootply" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link href="../stylesheets/bootstrap.min.css" rel="stylesheet"><link href="../stylesheets/styles.css" rel="stylesheet">
</head> <body><div  class="modal show" tabindex="-1" role="dialog" aria-hidden="true"><div class="modal-dialog">
<div class="modal-content"><div class="modal-header"><h1 class="text-center">贴吧云 - 更新</h1></div>
<div class="modal-body"><div class="jumbotron">
Example #27
0
/**
 * This function checks a plugin manifest 'elgg_version' value against the current install
 * returning TRUE if the elgg_version is >= the current install's version.
 *
 * @deprecated 1.8 Use ElggPlugin->canActivate()
 *
 * @param string $manifest_elgg_version_string The build version (eg 2009010201).
 * @return bool
 */
function check_plugin_compatibility($manifest_elgg_version_string)
{
    elgg_deprecated_notice('check_plugin_compatibility() is deprecated by ElggPlugin->canActivate()', 1.8);
    $version = get_version();
    if (strpos($manifest_elgg_version_string, '.') === false) {
        // Using version
        $req_version = (int) $manifest_elgg_version_string;
        return $version >= $req_version;
    }
    return false;
}
<?php

/* Don't remove this line */
if (!defined('XOOPS_ROOT_PATH')) {
    exit;
}
/* This file sets various arrays and variables for use in WordPress */
# WordPress version
$GLOBALS['wp_version'] = 'ME for XOOPS ' . get_version();
# BBcode search and replace arrays
$GLOBALS['wp_bbcode']['in'] = array('#\\[b](.+?)\\[/b]#is', '#\\[i](.+?)\\[/i]#is', '#\\[u](.+?)\\[/u]#is', '#\\[s](.+?)\\[/s]#is', '#\\[color=(.+?)](.+?)\\[/color]#is', '#\\[size=(.+?)](.+?)\\[/size]#is', '#\\[font=(.+?)](.+?)\\[/font]#is', '#\\[img](.+?)\\[/img]#is', '#\\[url](.+?)\\[/url]#is', '#\\[url=(.+?)](.+?)\\[/url]#is');
$GLOBALS['wp_bbcode']['out'] = array('<strong>$1</strong>', '<em>$1</em>', '<span style="text-decoration:underline">$1</span>', '<span style="text-decoration:line-through">$1</span>', '<span style="color:$1">$2</span>', '<span style="font-size:$1px">$2</span>', '<span style="font-family:$1">$2</span>', '<img src="$1" alt="" />', '<a href="$1">$1</a>', '<a href="$1" title="$2">$2</a>');
# GreyMatter formatting search and replace arrays
$GLOBALS['wp_gmcode']['in'] = array('#\\*\\*(.+?)\\*\\*#is', '#\\\\(.+?)\\\\#is', '#\\__(.+?)\\__#is');
$GLOBALS['wp_gmcode']['out'] = array('<strong>$1</strong>', '<em>$1</em>', '<span style="text-decoration:underline">$1</span>');
# Translation of HTML entities and special characters
$GLOBALS['wp_htmltrans'] = array_flip(get_html_translation_table(HTML_ENTITIES));
$GLOBALS['wp_htmltrans']['<'] = '<';
# preserve HTML
$GLOBALS['wp_htmltrans']['>'] = '>';
# preserve HTML
$wp_htmltransbis = array('–' => '&#8211;', '—' => '&#8212;', '‘' => '&#8216;', '’' => '&#8217;', '“' => '&#8220;', '”' => '&#8221;', '•' => '&#8226;', '€' => '&#8364;', '&lt;' => '&#60;', '&gt;' => '&#62;', '&amp;' => '&#038;', '&sp;' => '&#32;', '&excl;' => '&#33;', '&quot;' => '&#34;', '&num;' => '&#35;', '&dollar;' => '&#36;', '&percnt;' => '&#37;', '&apos;' => '&#39;', '&lpar;' => '&#40;', '&rpar;' => '&#41;', '&ast;' => '&#42;', '&plus;' => '&#43;', '&comma;' => '&#44;', '&hyphen;' => '&#45;', '&minus;' => '&#45;', '&period;' => '&#46;', '&sol;' => '&#47;', '&colon;' => '&#58;', '&semi;' => '&#59;', '&lt;' => '&#60;', '&equals;' => '&#61;', '&gt;' => '&#62;', '&quest;' => '&#63;', '&commat;' => '&#64;', '&lsqb;' => '&#91;', '&bsol;' => '&#92;', '&rsqb;' => '&#93;', '&circ;' => '&#94;', '&lowbar;' => '&#95;', '&horbar;' => '&#95;', '&grave;' => '&#96;', '&lcub;' => '&#123;', '&verbar;' => '&#124;', '&rcub;' => '&#125;', '&tilde;' => '&#126;', '&lsquor;' => '&#130;', '&ldquor;' => '&#132;', '&ldots;' => '&#133;', '&Scaron;' => '&#138;', '&lsaquo;' => '&#139;', '&OElig;' => '&#140;', '&lsquo;' => '&#145;', '&rsquor;' => '&#145;', '&rsquo;' => '&#146;', '&ldquo;' => '&#147;', '&rdquor;' => '&#147;', '&rdquo;' => '&#148;', '&bull;' => '&#149;', '&ndash;' => '&#150;', '&endash;' => '&#150;', '&mdash;' => '&#151;', '&emdash;' => '&#151;', '&tilde;' => '&#152;', '&trade;' => '&#153;', '&scaron;' => '&#154;', '&rsaquo;' => '&#155;', '&oelig;' => '&#156;', '&Yuml;' => '&#159;', '&nbsp;' => '&#160;', '&iexcl;' => '&#161;', '&cent;' => '&#162;', '&pound;' => '&#163;', '&curren;' => '&#164;', '&yen;' => '&#165;', '&brvbar;' => '&#166;', '&brkbar;' => '&#166;', '&sect;' => '&#167;', '&uml;' => '&#168;', '&die;' => '&#168;', '&copy;' => '&#169;', '&ordf;' => '&#170;', '&laquo;' => '&#171;', '&not;' => '&#172;', '&shy;' => '&#173;', '&reg;' => '&#174;', '&macr;' => '&#175;', '&hibar;' => '&#175;', '&deg;' => '&#176;', '&plusmn;' => '&#177;', '&sup2;' => '&#178;', '&sup3;' => '&#179;', '&acute;' => '&#180;', '&micro;' => '&#181;', '&para;' => '&#182;', '&middot;' => '&#183;', '&cedil;' => '&#184;', '&sup1;' => '&#185;', '&ordm;' => '&#186;', '&raquo;' => '&#187;', '&frac14;' => '&#188;', '&frac12;' => '&#189;', '&half;' => '&#189;', '&frac34;' => '&#190;', '&iquest;' => '&#191;', '&Agrave;' => '&#192;', '&Aacute;' => '&#193;', '&Acirc;' => '&#194;', '&Atilde;' => '&#195;', '&Auml;' => '&#196;', '&Aring;' => '&#197;', '&AElig;' => '&#198;', '&Ccedil;' => '&#199;', '&Egrave;' => '&#200;', '&Eacute;' => '&#201;', '&Ecirc;' => '&#202;', '&Euml;' => '&#203;', '&Igrave;' => '&#204;', '&Iacute;' => '&#205;', '&Icirc;' => '&#206;', '&Iuml;' => '&#207;', '&ETH;' => '&#208;', '&Ntilde;' => '&#209;', '&Ograve;' => '&#210;', '&Oacute;' => '&#211;', '&Ocirc;' => '&#212;', '&Otilde;' => '&#213;', '&Ouml;' => '&#214;', '&times;' => '&#215;', '&Oslash;' => '&#216;', '&Ugrave;' => '&#217;', '&Uacute;' => '&#218;', '&Ucirc;' => '&#219;', '&Uuml;' => '&#220;', '&Yacute;' => '&#221;', '&THORN;' => '&#222;', '&szlig;' => '&#223;', '&agrave;' => '&#224;', '&aacute;' => '&#225;', '&acirc;' => '&#226;', '&atilde;' => '&#227;', '&auml;' => '&#228;', '&aring;' => '&#229;', '&aelig;' => '&#230;', '&ccedil;' => '&#231;', '&egrave;' => '&#232;', '&eacute;' => '&#233;', '&ecirc;' => '&#234;', '&euml;' => '&#235;', '&igrave;' => '&#236;', '&iacute;' => '&#237;', '&icirc;' => '&#238;', '&iuml;' => '&#239;', '&eth;' => '&#240;', '&ntilde;' => '&#241;', '&ograve;' => '&#242;', '&oacute;' => '&#243;', '&ocirc;' => '&#244;', '&otilde;' => '&#245;', '&ouml;' => '&#246;', '&divide;' => '&#247;', '&oslash;' => '&#248;', '&ugrave;' => '&#249;', '&uacute;' => '&#250;', '&ucirc;' => '&#251;', '&uuml;' => '&#252;', '&yacute;' => '&#253;', '&thorn;' => '&#254;', '&yuml;' => '&#255;', '&OElig;' => '&#338;', '&oelig;' => '&#339;', '&Scaron;' => '&#352;', '&scaron;' => '&#353;', '&Yuml;' => '&#376;', '&fnof;' => '&#402;', '&circ;' => '&#710;', '&tilde;' => '&#732;', '&Alpha;' => '&#913;', '&Beta;' => '&#914;', '&Gamma;' => '&#915;', '&Delta;' => '&#916;', '&Epsilon;' => '&#917;', '&Zeta;' => '&#918;', '&Eta;' => '&#919;', '&Theta;' => '&#920;', '&Iota;' => '&#921;', '&Kappa;' => '&#922;', '&Lambda;' => '&#923;', '&Mu;' => '&#924;', '&Nu;' => '&#925;', '&Xi;' => '&#926;', '&Omicron;' => '&#927;', '&Pi;' => '&#928;', '&Rho;' => '&#929;', '&Sigma;' => '&#931;', '&Tau;' => '&#932;', '&Upsilon;' => '&#933;', '&Phi;' => '&#934;', '&Chi;' => '&#935;', '&Psi;' => '&#936;', '&Omega;' => '&#937;', '&alpha;' => '&#945;', '&beta;' => '&#946;', '&gamma;' => '&#947;', '&delta;' => '&#948;', '&epsilon;' => '&#949;', '&zeta;' => '&#950;', '&eta;' => '&#951;', '&theta;' => '&#952;', '&iota;' => '&#953;', '&kappa;' => '&#954;', '&lambda;' => '&#955;', '&mu;' => '&#956;', '&nu;' => '&#957;', '&xi;' => '&#958;', '&omicron;' => '&#959;', '&pi;' => '&#960;', '&rho;' => '&#961;', '&sigmaf;' => '&#962;', '&sigma;' => '&#963;', '&tau;' => '&#964;', '&upsilon;' => '&#965;', '&phi;' => '&#966;', '&chi;' => '&#967;', '&psi;' => '&#968;', '&omega;' => '&#969;', '&thetasym;' => '&#977;', '&upsih;' => '&#978;', '&piv;' => '&#982;', '&ensp;' => '&#8194;', '&emsp;' => '&#8195;', '&thinsp;' => '&#8201;', '&zwnj;' => '&#8204;', '&zwj;' => '&#8205;', '&lrm;' => '&#8206;', '&rlm;' => '&#8207;', '&ndash;' => '&#8211;', '&mdash;' => '&#8212;', '&lsquo;' => '&#8216;', '&rsquo;' => '&#8217;', '&sbquo;' => '&#8218;', '&ldquo;' => '&#8220;', '&rdquo;' => '&#8221;', '&bdquo;' => '&#8222;', '&dagger;' => '&#8224;', '&Dagger;' => '&#8225;', '&bull;' => '&#8226;', '&hellip;' => '&#8230;', '&permil;' => '&#8240;', '&prime;' => '&#8242;', '&Prime;' => '&#8243;', '&lsaquo;' => '&#8249;', '&rsaquo;' => '&#8250;', '&oline;' => '&#8254;', '&frasl;' => '&#8260;', '&euro;' => '&#8364;', '&image;' => '&#8465;', '&weierp;' => '&#8472;', '&real;' => '&#8476;', '&trade;' => '&#8482;', '&alefsym;' => '&#8501;', '&larr;' => '&#8592;', '&uarr;' => '&#8593;', '&rarr;' => '&#8594;', '&darr;' => '&#8595;', '&harr;' => '&#8596;', '&crarr;' => '&#8629;', '&lArr;' => '&#8656;', '&uArr;' => '&#8657;', '&rArr;' => '&#8658;', '&dArr;' => '&#8659;', '&hArr;' => '&#8660;', '&forall;' => '&#8704;', '&part;' => '&#8706;', '&exist;' => '&#8707;', '&empty;' => '&#8709;', '&nabla;' => '&#8711;', '&isin;' => '&#8712;', '&notin;' => '&#8713;', '&ni;' => '&#8715;', '&prod;' => '&#8719;', '&sum;' => '&#8721;', '&minus;' => '&#8722;', '&lowast;' => '&#8727;', '&radic;' => '&#8730;', '&prop;' => '&#8733;', '&infin;' => '&#8734;', '&ang;' => '&#8736;', '&and;' => '&#8743;', '&or;' => '&#8744;', '&cap;' => '&#8745;', '&cup;' => '&#8746;', '&int;' => '&#8747;', '&there4;' => '&#8756;', '&sim;' => '&#8764;', '&cong;' => '&#8773;', '&asymp;' => '&#8776;', '&ne;' => '&#8800;', '&equiv;' => '&#8801;', '&le;' => '&#8804;', '&ge;' => '&#8805;', '&sub;' => '&#8834;', '&sup;' => '&#8835;', '&nsub;' => '&#8836;', '&sube;' => '&#8838;', '&supe;' => '&#8839;', '&oplus;' => '&#8853;', '&otimes;' => '&#8855;', '&perp;' => '&#8869;', '&sdot;' => '&#8901;', '&lceil;' => '&#8968;', '&rceil;' => '&#8969;', '&lfloor;' => '&#8970;', '&rfloor;' => '&#8971;', '&lang;' => '&#9001;', '&rang;' => '&#9002;', '&loz;' => '&#9674;', '&spades;' => '&#9824;', '&clubs;' => '&#9827;', '&hearts;' => '&#9829;', '&diams;' => '&#9830;');
$GLOBALS['wp_htmltrans'] = array_merge($GLOBALS['wp_htmltrans'], $wp_htmltransbis);
# Translation of invalid Unicode references range to valid range
$GLOBALS['wp_htmltranswinuni'] = array('&#128;' => '&#8364;', '&#129;' => '', '&#130;' => '&#8218;', '&#131;' => '&#402;', '&#132;' => '&#8222;', '&#133;' => '&#8230;', '&#134;' => '&#8224;', '&#135;' => '&#8225;', '&#136;' => '&#710;', '&#137;' => '&#8240;', '&#138;' => '&#352;', '&#139;' => '&#8249;', '&#140;' => '&#338;', '&#141;' => '', '&#142;' => '&#382;', '&#143;' => '', '&#144;' => '', '&#145;' => '&#8216;', '&#146;' => '&#8217;', '&#147;' => '&#8220;', '&#148;' => '&#8221;', '&#149;' => '&#8226;', '&#150;' => '&#8211;', '&#151;' => '&#8212;', '&#152;' => '&#732;', '&#153;' => '&#8482;', '&#154;' => '&#353;', '&#155;' => '&#8250;', '&#156;' => '&#339;', '&#157;' => '', '&#158;' => '', '&#159;' => '&#376;');
# on which page are we ?
$GLOBALS['PHP_SELF'] = $_SERVER['PHP_SELF'];
$GLOBALS['pagenow'] = explode('/', $GLOBALS['PHP_SELF']);
$GLOBALS['pagenow'] = trim($GLOBALS['pagenow'][sizeof($GLOBALS['pagenow']) - 1]);
$GLOBALS['pagenow'] = explode('?', $GLOBALS['pagenow']);
$GLOBALS['pagenow'] = $GLOBALS['pagenow'][0];
Example #29
0
function elgg_solr_is_elgg18()
{
    if (is_callable('elgg_get_version')) {
        return false;
        // this is newer than 1.8
    }
    $is_elgg18 = strpos(get_version(true), '1.8') === 0;
    return $is_elgg18;
}
Example #30
0
/**
 * Upgrades Elgg
 *
 */
function version_upgrade()
{
    $dbversion = (int) datalist_get('version');
    // Upgrade database
    db_upgrade($dbversion);
    system_message(elgg_echo('upgrade:db'));
    // Upgrade core
    if (upgrade_code($dbversion)) {
        system_message(elgg_echo('upgrade:core'));
    }
    // Update the version
    datalist_set('version', get_version());
}