From 707be9dd951e005d29db1dc9fd2a7edeb56745a5 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Mon, 24 Apr 2023 16:47:05 +0200 Subject: [PATCH] move file to prepare namespace --- _prepend.php | 21 -------- inc/patch.0.5.php | 48 ------------------- js/{post.js => backend.js} | 0 js/{index.js => manage.js} | 0 _admin.php => src/Backend.php | 0 .../BackendBehaviors.php | 0 _public.php => src/Frontend.php | 0 _install.php => src/Install.php | 0 index.php => src/Manage.php | 0 inc/lib.pwt.list.php => src/ManageList.php | 0 inc/class.postwidgettext.php => src/Utils.php | 0 _widgets.php => src/Widgets.php | 0 12 files changed, 69 deletions(-) delete mode 100644 _prepend.php delete mode 100644 inc/patch.0.5.php rename js/{post.js => backend.js} (100%) rename js/{index.js => manage.js} (100%) rename _admin.php => src/Backend.php (100%) rename inc/lib.pwt.admin.php => src/BackendBehaviors.php (100%) rename _public.php => src/Frontend.php (100%) rename _install.php => src/Install.php (100%) rename index.php => src/Manage.php (100%) rename inc/lib.pwt.list.php => src/ManageList.php (100%) rename inc/class.postwidgettext.php => src/Utils.php (100%) rename _widgets.php => src/Widgets.php (100%) diff --git a/_prepend.php b/_prepend.php deleted file mode 100644 index 775b4ae..0000000 --- a/_prepend.php +++ /dev/null @@ -1,21 +0,0 @@ -autoload([ - 'postWidgetText' => __DIR__ . '/inc/class.postwidgettext.php', - 'adminPostWidgetText' => __DIR__ . '/inc/lib.pwt.admin.php', - 'listPostWidgetText' => __DIR__ . '/inc/lib.pwt.list.php', -]); diff --git a/inc/patch.0.5.php b/inc/patch.0.5.php deleted file mode 100644 index d50e219..0000000 --- a/inc/patch.0.5.php +++ /dev/null @@ -1,48 +0,0 @@ -con->select( - 'SELECT W.*, P.post_lang, P.post_format FROM ' . dcCore::app()->prefix . 'post_wtext W ' . - 'LEFT JOIN ' . dcCore::app()->prefix . dcBlog::POST_TABLE_NAME . ' P ON P.post_id=W.post_id ' -); -if (!$records->isEmpty()) { - $cur = dcCore::app()->con->openCursor(dcCore::app()->prefix . initPostWidgetText::PWT_TABLE_NAME); - while ($records->fetch()) { - dcCore::app()->con->writeLock(dcCore::app()->prefix . initPostWidgetText::PWT_TABLE_NAME); - - try { - $id = dcCore::app()->con->select( - 'SELECT MAX(option_id) FROM ' . dcCore::app()->prefix . initPostWidgetText::PWT_TABLE_NAME - )->f(0) + 1; - - $cur->clean(); - $cur->option_creadt = date('Y-m-d H:i:s'); - $cur->option_upddt = date('Y-m-d H:i:s'); - - $cur->option_id = $id; - $cur->post_id = $records->post_id; - $cur->option_type = $records->wtext_type; - $cur->option_lang = $records->post_lang; - $cur->option_format = $records->post_format; - $cur->option_title = $records->wtext_title; - $cur->option_content = $records->wtext_content; - $cur->option_content_xhtml = $records->wtext_content_xhtml; - - $cur->insert(); - dcCore::app()->con->unlock(); - } catch (Exception $e) { - dcCore::app()->con->unlock(); - - throw $e; - } - } -} diff --git a/js/post.js b/js/backend.js similarity index 100% rename from js/post.js rename to js/backend.js diff --git a/js/index.js b/js/manage.js similarity index 100% rename from js/index.js rename to js/manage.js diff --git a/_admin.php b/src/Backend.php similarity index 100% rename from _admin.php rename to src/Backend.php diff --git a/inc/lib.pwt.admin.php b/src/BackendBehaviors.php similarity index 100% rename from inc/lib.pwt.admin.php rename to src/BackendBehaviors.php diff --git a/_public.php b/src/Frontend.php similarity index 100% rename from _public.php rename to src/Frontend.php diff --git a/_install.php b/src/Install.php similarity index 100% rename from _install.php rename to src/Install.php diff --git a/index.php b/src/Manage.php similarity index 100% rename from index.php rename to src/Manage.php diff --git a/inc/lib.pwt.list.php b/src/ManageList.php similarity index 100% rename from inc/lib.pwt.list.php rename to src/ManageList.php diff --git a/inc/class.postwidgettext.php b/src/Utils.php similarity index 100% rename from inc/class.postwidgettext.php rename to src/Utils.php diff --git a/_widgets.php b/src/Widgets.php similarity index 100% rename from _widgets.php rename to src/Widgets.php