Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

Commit

Permalink
Converted all line endings.
Browse files Browse the repository at this point in the history
  • Loading branch information
brettp committed Feb 21, 2010
1 parent 3f458b4 commit 06a4157
Showing 1 changed file with 34 additions and 34 deletions.
68 changes: 34 additions & 34 deletions actions/generate.php
@@ -1,35 +1,35 @@
<?php
global $CONFIG;

admin_gatekeeper();
action_gatekeeper();

$ref = get_input('ref');

if ($ref)
{
$keypair = create_api_user($CONFIG->site_id);

if ($keypair)
{

$newkey = new ElggObject();
$newkey->subtype = 'api_key';
$newkey->access_id = ACCESS_PUBLIC;
$newkey->title = $ref;
$newkey->public = $keypair->api_key;

if (!$newkey->save())
register_error(elgg_echo('apiadmin:generationfail'));
else
system_message(elgg_echo('apiadmin:generated'));
}
else
register_error(elgg_echo('apiadmin:generationfail'));
}
else
register_error(elgg_echo('apiadmin:noreference'));


forward($_SERVER['HTTP_REFERER']);
<?php
global $CONFIG;

admin_gatekeeper();
action_gatekeeper();

$ref = get_input('ref');

if ($ref)
{
$keypair = create_api_user($CONFIG->site_id);

if ($keypair)
{

$newkey = new ElggObject();
$newkey->subtype = 'api_key';
$newkey->access_id = ACCESS_PUBLIC;
$newkey->title = $ref;
$newkey->public = $keypair->api_key;

if (!$newkey->save())
register_error(elgg_echo('apiadmin:generationfail'));
else
system_message(elgg_echo('apiadmin:generated'));
}
else
register_error(elgg_echo('apiadmin:generationfail'));
}
else
register_error(elgg_echo('apiadmin:noreference'));


forward($_SERVER['HTTP_REFERER']);
?>

0 comments on commit 06a4157

Please sign in to comment.