Skip to content

Commit

Permalink
uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
voitto committed Sep 3, 2009
1 parent a83b427 commit a4589c6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
12 changes: 8 additions & 4 deletions app/shortener/shortener.php
Expand Up @@ -26,13 +26,17 @@ function set_up_new_shortener( &$model, &$rec ) {
$profile = get_profile();

global $db;
$result = $db->get_result("SELECT apikey FROM installs WHERE apiname like '".$profile->nickname."'");
$key = $db->result_value($result,0,'apikey');

if ($db->table_exists('installs')) {
$result = $db->get_result("SELECT apikey FROM installs WHERE apiname like '".$profile->nickname."'");
$key = $db->result_value($result,0,'apikey');
} else {
$key = false;
}

$Shortener =& $db->model('Shortener');
if (!$Shortener->exists)
$Shortener->save();

$s = $Shortener->base();
if ($key)
$s->set_value('apikey',$key);
Expand Down
Empty file removed config/.empty
Empty file.
1 change: 0 additions & 1 deletion db/boot.php
Expand Up @@ -418,7 +418,6 @@
}
$stream = $tags[0][2][0];
} elseif (isset($params['username']) && isset($params['password'])) {

$sql = "SELECT nickname FROM shorteners WHERE nickname LIKE '".$db->escape_string($params['username'])."'";
$sql .= " AND password LIKE '".$db->escape_string($params['password'])."'";
$result = $db->get_result( $sql );
Expand Down
Empty file removed uploads/.empty
Empty file.

0 comments on commit a4589c6

Please sign in to comment.