Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Fix to support mysqli
Browse files Browse the repository at this point in the history
  • Loading branch information
ghecquet committed Apr 8, 2016
1 parent 182fd15 commit 57fadc9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/src/plugins/conf.sql/class.sqlConfDriver.php
Expand Up @@ -475,6 +475,7 @@ public function deleteRepository($repositoryId)
case "sqlite3":
$children_results = dibi::query('SELECT * FROM [ajxp_roles] WHERE [searchable_repositories] LIKE %~like~ GROUP BY [role_id]', '"'.$repositoryId.'";s:');
break;
case "mysqli":
case "mysql":
$children_results = dibi::query('SELECT * FROM [ajxp_roles] WHERE [serial_role] LIKE %~like~ GROUP BY [role_id]', '"'.$repositoryId.'";s:');
break;
Expand Down Expand Up @@ -563,6 +564,7 @@ public function getRolesForRepository($repositoryId, $rolePrefix = '', $splitByT
$q['where'][] = ['[searchable_repositories] LIKE %~like~', $likeRepositoryId];
break;
case "mysql":
case "mysqli":
$q['where'][] = ['[serial_role] LIKE %~like~', $likeRepositoryId];
break;
default:
Expand Down Expand Up @@ -744,6 +746,7 @@ public function saveRoles($roles)
time()
);
break;
case "mysqli":
case "mysql":
dibi::query("INSERT INTO [ajxp_roles] ([role_id],[serial_role],[last_updated]) VALUES (%s, %s, %i)",
$roleId,
Expand Down Expand Up @@ -777,6 +780,7 @@ public function updateRole($role, $userObject = null)
dibi::query("INSERT INTO [ajxp_roles] ([role_id],[serial_role],[searchable_repositories],[last_updated]) VALUES (%s, %bin,%s,%i)", $role->getId(), serialize($role), serialize($role->listAcls()), time());
}
break;
case "mysqli":
case "mysql":
dibi::query("INSERT INTO [ajxp_roles] ([role_id],[serial_role],[last_updated]) VALUES (%s, %s, %i) ON DUPLICATE KEY UPDATE [serial_role]=VALUES([serial_role]), [last_updated]=VALUES([last_updated])", $role->getId(), serialize($role), time());
break;
Expand Down
1 change: 1 addition & 0 deletions core/src/plugins/log.sql/class.sqlLogDriver.php
Expand Up @@ -409,6 +409,7 @@ public function xmlListLogFiles($nodeName="file", $year=null, $month=null, $root
$mFunc = "strftime('%m', [logdate])";
$dFunc = "date([logdate])";
break;
case "mysqli":
case "mysql":
$yFunc = "YEAR([logdate])";
$mFunc = "MONTH([logdate])";
Expand Down

0 comments on commit 57fadc9

Please sign in to comment.