diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-07-25 15:47:19 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-07-25 15:47:19 +0000 |
commit | 6438acd96b4fe431dee7e94e6eeae80587a348ae (patch) | |
tree | 7431a3d10defadb6f3a8fc7c5c694d0d9bf9a186 | |
parent | cdc8add1161b1eefc96b26057ed0a776a5c70c9a (diff) | |
download | elgg-6438acd96b4fe431dee7e94e6eeae80587a348ae.tar.gz elgg-6438acd96b4fe431dee7e94e6eeae80587a348ae.tar.bz2 |
Main pinging mechanism now functional
git-svn-id: https://code.elgg.org/elgg/trunk@1543 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | actions/admin/site/update_basic.php | 6 | ||||
-rw-r--r-- | actions/systemsettings/install.php | 6 | ||||
-rw-r--r-- | engine/lib/ping.php | 26 |
3 files changed, 17 insertions, 21 deletions
diff --git a/actions/admin/site/update_basic.php b/actions/admin/site/update_basic.php index 10e693d94..f1c2025f6 100644 --- a/actions/admin/site/update_basic.php +++ b/actions/admin/site/update_basic.php @@ -49,6 +49,12 @@ else set_config('ping_home', 'disabled', $site->getGUID()); + // Now ping home + if ((!isset($usage)) || ($usage!='disabled')) + { + ping_home($site); + } + if ($site->save()) system_message(elgg_echo("admin:configuration:success")); else diff --git a/actions/systemsettings/install.php b/actions/systemsettings/install.php index dd60c847c..05ec62ba7 100644 --- a/actions/systemsettings/install.php +++ b/actions/systemsettings/install.php @@ -54,6 +54,12 @@ // activate river by default enable_plugin('river', $site->getGUID()); + + // Now ping home + if ((!isset($usage)) || ($usage!='disabled')) + { + ping_home($site); + } system_message(elgg_echo("installation:configuration:success"));
diff --git a/engine/lib/ping.php b/engine/lib/ping.php index 97f737901..8d91b1351 100644 --- a/engine/lib/ping.php +++ b/engine/lib/ping.php @@ -13,21 +13,22 @@ /** * The api for the pinger. */ - $NOTIFICATION_SERVER = "http://ping.elgg.org/services/api/rest.php"; + $NOTIFICATION_SERVER = "http://hub/~icewing/Workingdirectory/elggnew/services/api/rest.php"; //"http://ping.elgg.org/services/api/rest.php"; /** * Run once and only once. + * + * @param ElggSite $site The site who's information to use */ - function ping_run_once() + function ping_home(ElggSite $site) { global $NOTIFICATION_SERVER, $CONFIG; include_once($CONFIG->path . "version.php"); // Get export - $export = export($CONFIG->site_id); - $site = get_entity($CONFIG->site_id); + $export = export($site->guid); return send_api_post_call($NOTIFICATION_SERVER, array( @@ -42,21 +43,4 @@ 'text/xml' ); } - - /** - * Notify the server. - */ - function ping_init() - { - global $CONFIG; - - if ((!isset($CONFIG->ping_home)) || ($CONFIG->ping_home!='disabled')) - { - // Now run this stuff, but only once - // run_function_once("ping_run_once"); - } - } - - // Register a startup event - register_elgg_event_handler('init','system','ping_init'); ?>
\ No newline at end of file |