Merge branch 'development' of https://github.com/MPOS/php-mpos into development

This commit is contained in:
iAmShorty 2014-03-26 20:00:38 +01:00
commit 57c4e9c6ae
3 changed files with 3 additions and 13 deletions

View File

@ -112,16 +112,6 @@ class Share Extends Base {
return $this->sqlError();
}
/**
* Fetch the highest available share ID
**/
function getMaxShareId() {
$stmt = $this->mysqli->prepare("SELECT MAX(id) AS id FROM $this->table");
if ($this->checkStmt($stmt) && $stmt->execute() && $result = $stmt->get_result())
return $result->fetch_object()->id;
return $this->sqlError();
}
/**
* Fetch the highest available share ID from archive
**/

View File

@ -344,7 +344,7 @@ class Statistics extends Base {
$data['data'][$row['id']]['is_anonymous'] = $row['is_anonymous'];
}
}
$data['share_id'] = $this->share->getMaxShareId();
$data['share_id'] = $this->share->getLastInsertedShareId();
return $this->memcache->setCache(STATISTICS_ALL_USER_SHARES, $data);
}
return $this->sqlError();

View File

@ -53,11 +53,11 @@
<div class="panel-footer">
<div style="text-align:right">
<a href='{$smarty.server.SCRIPT_NAME}?page={$smarty.request.page|escape}&action=news_edit&id={$NEWS[news].id}'><i class="fa fa-wrench fa-fw"></i></a>&nbsp;
<a href='{$smarty.server.SCRIPT_NAME}?page={$smarty.request.page|escape}&action={$smarty.request.action|escape}&do=delete&id={$NEWS[news].id}'><i class="fw fa-trash-o fa-fw"></i></a>
<a href='{$smarty.server.SCRIPT_NAME}?page={$smarty.request.page|escape}&action={$smarty.request.action|escape}&do=delete&id={$NEWS[news].id}'><i class="fa fa-trash-o fa-fw"></i></a>
</div>
</div>
</div>
</div>
</div>
{/section}
{/nocache}
{/nocache}