Skip to content

Commit

Permalink
Merge pull request #4766 from mlocati/fix-get-class-with-invalid-synt…
Browse files Browse the repository at this point in the history
…ax-for-php5.3

[5.7] Fix get class with invalid syntax for php 5.3

Former-commit-id: 21bc3c4
Former-commit-id: 5dfa71315e8676e95961ede06d4adc1dbb56d9c0
  • Loading branch information
aembler committed Dec 6, 2016
2 parents 43cef97 + 2f5aeb2 commit ce39062
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions web/concrete/src/Utility/Service/Identifier.php
@@ -1,7 +1,6 @@
<?php
namespace Concrete\Core\Utility\Service;

use Concrete\Core\Database\Connection\Connection;
use Concrete\Core\Support\Facade\Application;
use Hautelook\Phpass\PasswordHash;

Expand Down Expand Up @@ -34,7 +33,7 @@ class Identifier
public function generateFromBase($string, $table, $key)
{
$foundRecord = false;
$db = Application::make(Connection::class);
$db = Application::make('Concrete\Core\Database\Connection\Connection');
$i = '';
$_string = '';
while ($foundRecord == false) {
Expand Down Expand Up @@ -68,7 +67,7 @@ public function generateFromBase($string, $table, $key)
public function generate($table, $key, $length = 12, $lowercase = false)
{
$foundHash = false;
$db = Application::make(Connection::class);
$db = Application::make('Concrete\Core\Database\Connection\Connection');
while ($foundHash == false) {
$string = $this->getString($length);
if ($lowercase) {
Expand Down Expand Up @@ -103,7 +102,7 @@ public function getString($length = 12)

public function deleteKey($table, $keyCol, $uHash)
{
$db = Application::make(Connection::class);
$db = Application::make('Concrete\Core\Database\Connection\Connection');
$db->Execute("DELETE FROM " . $table . " WHERE " . $keyCol . "=?", array($uHash));
}
}

0 comments on commit ce39062

Please sign in to comment.