Skip to content

Commit

Permalink
back to prepend
Browse files Browse the repository at this point in the history
  • Loading branch information
“philippe committed Jul 2, 2023
1 parent 8a897b2 commit d548117
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 21 deletions.
18 changes: 8 additions & 10 deletions src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,17 @@
namespace Dotclear\Theme\resume;

use dcCore;
use dcNsProcess;
use dcPage;
use Dotclear\Core\Process;
use Dotclear\Core\Backend\Page;
use Exception;
use form;

class Config extends dcNsProcess
class Config extends Process
{
public static function init(): bool
{
// limit to backend permissions
static::$init = My::checkContext(My::CONFIG);

if (!static::$init) {
if (!self::status(My::checkContext(My::CONFIG))) {
return false;
}

Expand Down Expand Up @@ -93,7 +91,7 @@ public static function init(): bool
*/
public static function process(): bool
{
if (!static::$init) {
if (!self::status()) {
return false;
}

Expand Down Expand Up @@ -181,7 +179,7 @@ public static function process(): bool
// Template cache reset
dcCore::app()->emptyTemplatesCache();

dcPage::success(__('Theme configuration upgraded.'), true, true);
Page::success(__('Theme configuration upgraded.'), true, true);
} catch (Exception $e) {
dcCore::app()->error->add($e->getMessage());
}
Expand All @@ -195,7 +193,7 @@ public static function process(): bool
*/
public static function render(): void
{
if (!static::$init) {
if (!self::status()) {
return;
}

Expand Down Expand Up @@ -291,7 +289,7 @@ public static function render(): void
echo '</form>';

echo '</div>'; // Close tab
dcPage::helpBlock('resume');
Page::helpBlock('resume');

// Legacy mode
if (!dcCore::app()->admin->standalone_config) {
Expand Down
8 changes: 4 additions & 4 deletions src/Frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@

use ArrayObject;
use dcCore;
use dcNsProcess;
use Dotclear\Core\Process;
use Dotclear\Helper\Html\Html;
use Dotclear\Helper\Network\Http;

class Frontend extends dcNsProcess
class Frontend extends Process
{
public static function init(): bool
{
return (static::$init = My::checkContext(My::FRONTEND));
return self::status(My::checkContext(My::FRONTEND));
}

public static function process(): bool
{
if (!static::$init) {
if (!self::status()) {
return false;
}

Expand Down
14 changes: 7 additions & 7 deletions src/Prepend.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@
namespace Dotclear\Theme\resume;

use dcCore;
use dcNsProcess;
use dcPage;
use Dotclear\Core\Process;
use Dotclear\Core\Backend\Page;

class Prepend extends dcNsProcess
class Prepend extends Process
{
public static function init(): bool
{
return (static::$init = My::checkContext(My::PREPEND));
return self::status(My::checkContext(My::PREPEND));
}

public static function process(): bool
{
if (!static::$init) {
if (!self::status()) {
return false;
}

Expand All @@ -45,8 +45,8 @@ public static function process(): bool
dcCore::app()->auth->user_prefs->addWorkspace('accessibility');
if (!dcCore::app()->auth->user_prefs->accessibility->nodragdrop) {
echo
dcPage::jsLoad('js/jquery/jquery-ui.custom.js') .
dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js');
Page::jsLoad('js/jquery/jquery-ui.custom.js') .
Page::jsLoad('js/jquery/jquery.ui.touch-punch.js');
}
});

Expand Down

0 comments on commit d548117

Please sign in to comment.