فهرست منبع

Move database methods to static and document database class (#6474)

* Add new static method to created newly connected database object

* Document database class and clean up and document some of the methods.
This removes the methods that should not be in each instance and places
them in the single instance class as to occupy less resources and be
able to create database objects more efficiently.

* More docs & removed the ability to set any value within the object.

Co-authored-by: Tim Fry <[email protected]>
frytimo 3 سال پیش
والد
کامیت
fc294595ea
2فایلهای تغییر یافته به همراه504 افزوده شده و 191 حذف شده
  1. 3 1
      core/user_logs/resources/classes/user_logs.php
  2. 501 190
      resources/classes/database.php

+ 3 - 1
core/user_logs/resources/classes/user_logs.php

@@ -73,6 +73,7 @@ if (!class_exists('user_logs')) {
 		 * add user_logs
 		 */
 		public static function add($result) {
+				$array = [];
 			//prepare the array
 				$array['user_logs'][0]["timestamp"] = 'now()';
 				$array['user_logs'][0]["domain_uuid"] = $result['domain_uuid'];
@@ -97,7 +98,8 @@ if (!class_exists('user_logs')) {
 				$database = new database;
 				$database->app_name = 'authentication';
 				$database->app_uuid = 'a8a12918-69a4-4ece-a1ae-3932be0e41f1';
-				$database->uuid($user_log_uuid);
+				if (strlen($user_log_uuid)>0)
+					$database->uuid($user_log_uuid);
 				$database->save($array, false);
 				$message = $database->message;
 

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 501 - 190
resources/classes/database.php


برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است