]> Kevux Git Server - koopa/commitdiff
Progress: minor cleanups and bugfixes, prepare management and administration dashboards
authorKevin Day <thekevinday@gmail.com>
Thu, 4 May 2017 04:24:15 +0000 (23:24 -0500)
committerKevin Day <thekevinday@gmail.com>
Thu, 4 May 2017 04:24:15 +0000 (23:24 -0500)
common/base/classes/base_path.php
common/base/classes/base_return.php
common/standard/classes/standard_path.php
common/standard/paths/a/dashboard.php
common/standard/paths/a/ja/dashboard.php [new file with mode: 0644]
common/standard/paths/m/dashboard.php [new file with mode: 0644]
common/standard/paths/m/ja/dashboard.php [new file with mode: 0644]
common/standard/paths/u/dashboard.php

index 6dc890d61ac99c3c99811315cb20a16d242ea6a0..bb827314e8ffbaacd6870b2831cae045fc80cf21 100644 (file)
@@ -74,27 +74,27 @@ class c_base_path extends c_base_rfc_string {
     'encoding' => 'UTF-8',
   );
 
-  protected $id_group = NULL;
+  protected $id_group;
 
-  protected $is_content  = NULL;
-  protected $is_alias    = NULL;
-  protected $is_redirect = NULL;
-  protected $is_private  = NULL;
-  protected $is_locked   = NULL;
-  protected $is_root     = NULL;
+  protected $is_content;
+  protected $is_alias;
+  protected $is_redirect;
+  protected $is_private;
+  protected $is_locked;
+  protected $is_root;
 
-  protected $field_destination   = NULL;
-  protected $field_response_code = NULL;
+  protected $field_destination;
+  protected $field_response_code;
 
-  protected $date_created = NULL;
-  protected $date_changed = NULL;
-  protected $date_locked  = NULL;
+  protected $date_created;
+  protected $date_changed;
+  protected $date_locked;
 
-  protected $include_directory = NULL;
-  protected $include_name      = NULL;
+  protected $include_directory;
+  protected $include_name;
 
-  protected $allowed_methods = NULL;
-  protected $sanitize_html   = NULL;
+  protected $allowed_methods;
+  protected $sanitize_html;
 
 
   /**
@@ -112,7 +112,6 @@ class c_base_path extends c_base_rfc_string {
     $this->is_locked   = FALSE;
     $this->is_root     = FALSE;
 
-
     $this->field_destination   = NULL;
     $this->field_response_code = NULL;
 
@@ -178,91 +177,6 @@ class c_base_path extends c_base_rfc_string {
   }
 
   /**
-   * Assign the value.
-   *
-   * The string must be a valid URL path.
-   *
-   * This removes multiple consecutive '/'.
-   * This removes any '/' prefix.
-   * This removes any '/' suffix.
-   * This limits the string size to 256 characters.
-   *
-   * @param string $value
-   *   Any value so long as it is a string.
-   *   NULL is not allowed.
-   *
-   * @return bool
-   *   TRUE on success, FALSE otherwise.
-   */
-  public function set_value($value) {
-    if (!is_string($value)) {
-      return FALSE;
-    }
-
-    $sanitized = self::pr_sanitize_path($value);
-
-    // the path wildcard is intentionally non-standard.
-    // remove it so that it does not cause the validator to fail.
-    $without_wildcard = preg_replace('@(^%/|^%$|/%/|/%$)@', '', $sanitized);
-    if (!is_string($without_wildcard)) {
-      return FALSE;
-    }
-
-    // check to see if sanitized value is allowed.
-    $without_wilcard_parts = $this->pr_rfc_string_prepare($without_wildcard);
-    unset($without_wildcard);
-
-    if ($without_wilcard_parts['invalid']) {
-      unset($without_wilcard_parts);
-      unset($sanitized);
-      return FALSE;
-    }
-
-    $validated = $this->pr_rfc_string_is_path($without_wilcard_parts['ordinals'], $without_wilcard_parts['characters']);
-    if ($validated['invalid']) {
-      unset($without_wilcard_parts);
-      unset($validated);
-      unset($sanitized);
-      return FALSE;
-    }
-    unset($without_wilcard_parts);
-    unset($validated);
-
-    $this->value = $sanitized;
-    unset($sanitized);
-
-    return TRUE;
-  }
-
-  /**
-   * Return the value.
-   *
-   * @return string|null $value
-   *   The value array stored within this class.
-   */
-  public function get_value() {
-    if (!is_string($this->value)) {
-      return NULL;
-    }
-
-    return $this->value;
-  }
-
-  /**
-   * Return the value of the expected type.
-   *
-   * @return DOMNode $value
-   *   The value DOMNode stored within this class.
-   */
-  public function get_value_exact() {
-    if (!is_string($this->value)) {
-      return '';
-    }
-
-    return $this->value;
-  }
-
-  /**
    * Create a content path.
    *
    * @param int $id_group
@@ -414,6 +328,63 @@ class c_base_path extends c_base_rfc_string {
   }
 
   /**
+   * Assign the value.
+   *
+   * The string must be a valid URL path.
+   *
+   * This removes multiple consecutive '/'.
+   * This removes any '/' prefix.
+   * This removes any '/' suffix.
+   * This limits the string size to 256 characters.
+   *
+   * @param string $value
+   *   Any value so long as it is a string.
+   *   NULL is not allowed.
+   *
+   * @return bool
+   *   TRUE on success, FALSE otherwise.
+   */
+  public function set_value($value) {
+    if (!is_string($value)) {
+      return FALSE;
+    }
+
+    $sanitized = self::pr_sanitize_path($value);
+
+    // the path wildcard is intentionally non-standard.
+    // remove it so that it does not cause the validator to fail.
+    $without_wildcard = preg_replace('@(^%/|^%$|/%/|/%$)@', '', $sanitized);
+    if (!is_string($without_wildcard)) {
+      return FALSE;
+    }
+
+    // check to see if sanitized value is allowed.
+    $without_wilcard_parts = $this->pr_rfc_string_prepare($without_wildcard);
+    unset($without_wildcard);
+
+    if ($without_wilcard_parts['invalid']) {
+      unset($without_wilcard_parts);
+      unset($sanitized);
+      return FALSE;
+    }
+
+    $validated = $this->pr_rfc_string_is_path($without_wilcard_parts['ordinals'], $without_wilcard_parts['characters']);
+    if ($validated['invalid']) {
+      unset($without_wilcard_parts);
+      unset($validated);
+      unset($sanitized);
+      return FALSE;
+    }
+    unset($without_wilcard_parts);
+    unset($validated);
+
+    $this->value = $sanitized;
+    unset($sanitized);
+
+    return TRUE;
+  }
+
+  /**
    * Assigns sort id.
    *
    * @param int $id_group
@@ -679,6 +650,34 @@ class c_base_path extends c_base_rfc_string {
   }
 
   /**
+   * Return the value.
+   *
+   * @return string|null
+   *   The value array stored within this class.
+   */
+  public function get_value() {
+    if (!is_string($this->value)) {
+      return NULL;
+    }
+
+    return $this->value;
+  }
+
+  /**
+   * Return the value of the expected type.
+   *
+   * @return DOMNode
+   *   The value DOMNode stored within this class.
+   */
+  public function get_value_exact() {
+    if (!is_string($this->value)) {
+      return '';
+    }
+
+    return $this->value;
+  }
+
+  /**
    * Gets the ID sort setting.
    *
    * @return c_base_return_int
@@ -695,6 +694,160 @@ class c_base_path extends c_base_rfc_string {
   }
 
   /**
+   * Gets the destination field setting.
+   *
+   * @return c_base_return_string|c_base_return_array
+   *   Destination field on success.
+   *   An empty string is returned if not defined.
+   *   Error bit is set on error.
+   */
+  public function get_field_destination() {
+    if (!is_string($this->field_destination) && !is_array($this->field_destination)) {
+      return c_base_return_string::s_new('');
+    }
+
+    if (is_string($this->field_destination)) {
+      return c_base_return_string::s_new($this->field_destination);
+    }
+
+    return c_base_return_array::s_new($this->field_destination);
+  }
+
+  /**
+   * Gets the response code field setting.
+   *
+   * @return c_base_return_int
+   *   Response code on success.
+   *   An empty string is returned if not defined.
+   *   Error bit is set on error.
+   */
+  public function get_field_response_code() {
+    if (!is_int($this->field_response_code)) {
+      return c_base_return_int::s_new('');
+    }
+
+    return c_base_return_int::s_new($this->field_response_code);
+  }
+
+  /**
+   * Gets the date created setting.
+   *
+   * @return c_base_return_float|c_base_return_null
+   *   Date created on success.
+   *   FALSE is returned if the date is not assigned.
+   *   Error bit is set on error.
+   */
+  public function get_date_created() {
+    if (!is_float($this->date_created)) {
+      return new c_base_return_false();
+    }
+
+    return c_base_return_float::s_new($this->date_created);
+  }
+
+  /**
+   * Gets the date changed setting.
+   *
+   * @return c_base_return_float|c_base_return_null
+   *   Date changed on success.
+   *   FALSE is returned if the date is not assigned.
+   *   Error bit is set on error.
+   */
+  public function get_date_changed() {
+    if (!is_float($this->date_changed)) {
+      return new c_base_return_null();
+    }
+
+    return c_base_return_float::s_new($this->date_changed);
+  }
+
+  /**
+   * Gets the date locked setting.
+   *
+   * @return c_base_return_float|c_base_return_null
+   *   Date locked on success.
+   *   NULL is returned if the date is not assigned.
+   *   Error bit is set on error.
+   */
+  public function get_date_locked() {
+    if (!is_float($this->date_locked)) {
+      return new c_base_return_null();
+    }
+
+    return c_base_return_float::s_new($this->date_locked);
+  }
+
+  /**
+   * Get the assigned include path directory.
+   *
+   * This is the prefix part of the path.
+   *
+   * @return c_base_return_string|c_base_return_null
+   *   Include path string on success.
+   *   NULL is returned if the include path is not assigned.
+   *   Error bit is set on error.
+   */
+  public function get_include_directory() {
+    if (!is_string($this->include_directory)) {
+      return new c_base_return_null();
+    }
+
+    return c_base_return_string::s_new($this->include_directory);
+  }
+
+  /**
+   * Get the assigned include path name.
+   *
+   * This is the suffix part of the path.
+   *
+   * @return c_base_return_string|c_base_return_null
+   *   Include path string on success.
+   *   NULL is returned if the include path is not assigned.
+   *   Error bit is set on error.
+   */
+  public function get_include_name() {
+    if (!is_string($this->include_name)) {
+      return new c_base_return_null();
+    }
+
+    return c_base_return_string::s_new($this->include_name);
+  }
+
+  /**
+   * Get the assigned include path name.
+   *
+   * This is the suffix part of the path.
+   *
+   * @return c_base_return_array
+   *   An array of allowed methods is returned.
+   *   An empty array with the error bit set is returned on error.
+   */
+  public function get_allowed_methods() {
+    if (!is_array($this->allowed_methods)) {
+      $this->allowed_methods = self::DEFAULT_ALLOWED_METHODS;
+    }
+
+    return c_base_return_array::s_new($this->allowed_methods);
+  }
+
+  /**
+   * Get the currently assigned HTML sanitization settings.
+   *
+   * @return c_base_return_array
+   *   An array of html sanitization settings.
+   *   An empty array with the error bit set is returned on error.
+   *
+   * @see: htmlspecialchars()
+   */
+  public function get_sanitize_html() {
+    if (!is_array($this->sanitize_html)) {
+      $this->sanitize_html = self::DEFAULT_SANITIZE_HTML;
+    }
+
+    return c_base_return_array::s_new($this->sanitize_html);
+  }
+
+  /**
    * Get or Assign the is content boolean setting.
    *
    * @param bool|null $is_content
@@ -893,160 +1046,6 @@ class c_base_path extends c_base_rfc_string {
   }
 
   /**
-   * Gets the destination field setting.
-   *
-   * @return c_base_return_string|c_base_return_array
-   *   Destination field on success.
-   *   An empty string is returned if not defined.
-   *   Error bit is set on error.
-   */
-  public function get_field_destination() {
-    if (!is_string($this->field_destination) && !is_array($this->field_destination)) {
-      return c_base_return_string::s_new('');
-    }
-
-    if (is_string($this->field_destination)) {
-      return c_base_return_string::s_new($this->field_destination);
-    }
-
-    return c_base_return_array::s_new($this->field_destination);
-  }
-
-  /**
-   * Gets the response code field setting.
-   *
-   * @return c_base_return_int
-   *   Response code on success.
-   *   An empty string is returned if not defined.
-   *   Error bit is set on error.
-   */
-  public function get_field_response_code() {
-    if (!is_int($this->field_response_code)) {
-      return c_base_return_int::s_new('');
-    }
-
-    return c_base_return_int::s_new($this->field_response_code);
-  }
-
-  /**
-   * Gets the date created setting.
-   *
-   * @return c_base_return_float|c_base_return_null
-   *   Date created on success.
-   *   FALSE is returned if the date is not assigned.
-   *   Error bit is set on error.
-   */
-  public function get_date_created() {
-    if (!is_float($this->date_created)) {
-      return new c_base_return_false();
-    }
-
-    return c_base_return_float::s_new($this->date_created);
-  }
-
-  /**
-   * Gets the date changed setting.
-   *
-   * @return c_base_return_float|c_base_return_null
-   *   Date changed on success.
-   *   FALSE is returned if the date is not assigned.
-   *   Error bit is set on error.
-   */
-  public function get_date_changed() {
-    if (!is_float($this->date_changed)) {
-      return new c_base_return_null();
-    }
-
-    return c_base_return_float::s_new($this->date_changed);
-  }
-
-  /**
-   * Gets the date locked setting.
-   *
-   * @return c_base_return_float|c_base_return_null
-   *   Date locked on success.
-   *   NULL is returned if the date is not assigned.
-   *   Error bit is set on error.
-   */
-  public function get_date_locked() {
-    if (!is_float($this->date_locked)) {
-      return new c_base_return_null();
-    }
-
-    return c_base_return_float::s_new($this->date_locked);
-  }
-
-  /**
-   * Get the assigned include path directory.
-   *
-   * This is the prefix part of the path.
-   *
-   * @return c_base_return_string|c_base_return_null
-   *   Include path string on success.
-   *   NULL is returned if the include path is not assigned.
-   *   Error bit is set on error.
-   */
-  public function get_include_directory() {
-    if (!is_string($this->include_directory)) {
-      return new c_base_return_null();
-    }
-
-    return c_base_return_string::s_new($this->include_directory);
-  }
-
-  /**
-   * Get the assigned include path name.
-   *
-   * This is the suffix part of the path.
-   *
-   * @return c_base_return_string|c_base_return_null
-   *   Include path string on success.
-   *   NULL is returned if the include path is not assigned.
-   *   Error bit is set on error.
-   */
-  public function get_include_name() {
-    if (!is_string($this->include_name)) {
-      return new c_base_return_null();
-    }
-
-    return c_base_return_string::s_new($this->include_name);
-  }
-
-  /**
-   * Get the assigned include path name.
-   *
-   * This is the suffix part of the path.
-   *
-   * @return c_base_return_array
-   *   An array of allowed methods is returned.
-   *   An empty array with the error bit set is returned on error.
-   */
-  public function get_allowed_methods() {
-    if (!is_array($this->allowed_methods)) {
-      $this->allowed_methods = self::DEFAULT_ALLOWED_METHODS;
-    }
-
-    return c_base_return_array::s_new($this->allowed_methods);
-  }
-
-  /**
-   * Get the currently assigned HTML sanitization settings.
-   *
-   * @return c_base_return_array
-   *   An array of html sanitization settings.
-   *   An empty array with the error bit set is returned on error.
-   *
-   * @see: htmlspecialchars()
-   */
-  public function get_sanitize_html() {
-    if (!is_array($this->sanitize_html)) {
-      $this->sanitize_html = self::DEFAULT_SANITIZE_HTML;
-    }
-
-    return c_base_return_array::s_new($this->sanitize_html);
-  }
-
-  /**
    * Execute using the specified path, rendering the page.
    *
    * @param c_base_http $http
index df0eb1aa38ebf1a8597963bd5d32112021aac2b8..09de24c251bc6b845547b12cd6dd0c6d072f684e 100644 (file)
@@ -30,14 +30,7 @@ require_once('common/base/classes/base_error.php');
  * @require class base_error
  */
 trait t_base_return_value {
-  protected $value = NULL;
-
-  /**
-   * Class destructor.
-   */
-  public function __destruct() {
-    unset($this->value);
-  }
+  protected $value;
 
   /**
    * Assign the value.
@@ -207,14 +200,7 @@ trait t_base_return_value_exact {
  * This is added as a consideration and may be removed it ends up being unused.
  */
 trait t_base_return_message {
-  protected $message = NULL;
-
-  /**
-   * Class destructor.
-   */
-  public function __destruct() {
-    unset($this->message);
-  }
+  protected $message;
 
   /**
    * Assign the message.
@@ -550,6 +536,20 @@ class c_base_return_value extends c_base_return {
   use t_base_return_value;
 
   /**
+   * Class constructor.
+   */
+  public function __construct() {
+    $this->value = NULL;
+  }
+
+  /**
+   * Class destructor.
+   */
+  public function __destruct() {
+    unset($this->value);
+  }
+
+  /**
    * @see: t_base_return_value::p_s_new()
    */
   public static function s_new($value) {
index f3a447b8d8ec77b5691a19ca3e7ce7985af1ba63..b2582a1aab1065504b6e7a9ce8b3a4bb1646fd6c 100644 (file)
@@ -775,7 +775,7 @@ class c_standard_path extends c_base_path {
         }
       }
 
-      $href .= $request_uri['path'];
+      $href .= $this->request_uri['path'];
 
       $tag = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_BASE);
       $tag->set_attribute(c_base_markup_attributes::ATTRIBUTE_HREF, $href);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f6b10e76129d8a1605adfe8d22e8777aabc42703 100644 (file)
@@ -0,0 +1,80 @@
+<?php
+/**
+ * @file
+ * Provides path handler for the administer dashboard.
+ */
+
+require_once('common/base/classes/base_error.php');
+require_once('common/base/classes/base_return.php');
+require_once('common/base/classes/base_path.php');
+
+require_once('common/standard/classes/standard_path.php');
+
+require_once('common/theme/classes/theme_html.php');
+
+class c_standard_path_administer_dashboard extends c_standard_path {
+  protected const PATH_SELF = 'a/dashboard';
+
+  /**
+   * Implements do_execute().
+   */
+  public function do_execute(&$http, &$database, &$session, $settings = array()) {
+    // the parent function performs validation on the parameters.
+    $executed = parent::do_execute($http, $database, $session, $settings);
+    if (c_base_return::s_has_error($executed)) {
+      return $executed;
+    };
+
+    $this->pr_assign_defaults($http, $database, $session, $settings);
+
+    $wrapper = $this->pr_create_tag_section(array(1 => 0));
+
+
+    // initialize the content as HTML.
+    $this->pr_create_html();
+    $this->html->set_tag($wrapper);
+    unset($wrapper);
+
+    $executed->set_output($this->html);
+    unset($this->html);
+
+
+    return $executed;
+  }
+
+  /**
+   * Implementation of pr_create_html_add_header_link_canonical().
+   */
+  protected function pr_create_html_add_header_link_canonical() {
+    $tag = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_LINK);
+    $tag->set_attribute(c_base_markup_attributes::ATTRIBUTE_REL, 'canonical');
+    $tag->set_attribute(c_base_markup_attributes::ATTRIBUTE_HREF, $this->settings['base_scheme'] . '://' . $this->settings['base_host'] . $this->settings['base_port'] . $this->settings['base_path'] . self::PATH_SELF);
+    $this->html->set_header($tag);
+
+    unset($tag);
+  }
+
+  /**
+   * Implements pr_get_title().
+   */
+  protected function pr_get_title($arguments = array()) {
+    return $this->pr_get_text(0, $arguments);
+  }
+
+  /**
+   * Implements pr_get_text().
+   */
+  protected function pr_get_text($code, $arguments = array()) {
+    switch ($code) {
+      case 0:
+        $string = 'Administration Dashboard';
+        break;
+    }
+
+    if (!empty($arguments)) {
+      $this->pr_process_replacements($string, $arguments);
+    }
+
+    return $string;
+  }
+}
diff --git a/common/standard/paths/a/ja/dashboard.php b/common/standard/paths/a/ja/dashboard.php
new file mode 100644 (file)
index 0000000..ae9a97e
--- /dev/null
@@ -0,0 +1,29 @@
+<?php
+/**
+ * @file
+ * Provides path handler for the administer dashboard.
+ */
+
+/**
+ * Implements c_standard_path_administer_dashboard().
+ */
+class c_standard_path_administer_dashboard_ja extends c_standard_path_administer_dashboard {
+
+  /**
+   * Implements pr_get_text().
+   */
+  protected function pr_get_text($code, $arguments = array()) {
+    $string = '';
+    switch ($code) {
+      case 0:
+        $string = 'ダッシュボードの管理';
+        break;
+    }
+
+    if (!empty($arguments)) {
+      $this->pr_process_replacements($string, $arguments);
+    }
+
+    return $string;
+  }
+}
diff --git a/common/standard/paths/m/dashboard.php b/common/standard/paths/m/dashboard.php
new file mode 100644 (file)
index 0000000..158f73e
--- /dev/null
@@ -0,0 +1,80 @@
+<?php
+/**
+ * @file
+ * Provides path handler for the manager dashboard.
+ */
+
+require_once('common/base/classes/base_error.php');
+require_once('common/base/classes/base_return.php');
+require_once('common/base/classes/base_path.php');
+
+require_once('common/standard/classes/standard_path.php');
+
+require_once('common/theme/classes/theme_html.php');
+
+class c_standard_path_management_dashboard extends c_standard_path {
+  protected const PATH_SELF = 'm/dashboard';
+
+  /**
+   * Implements do_execute().
+   */
+  public function do_execute(&$http, &$database, &$session, $settings = array()) {
+    // the parent function performs validation on the parameters.
+    $executed = parent::do_execute($http, $database, $session, $settings);
+    if (c_base_return::s_has_error($executed)) {
+      return $executed;
+    };
+
+    $this->pr_assign_defaults($http, $database, $session, $settings);
+
+    $wrapper = $this->pr_create_tag_section(array(1 => 0));
+
+
+    // initialize the content as HTML.
+    $this->pr_create_html();
+    $this->html->set_tag($wrapper);
+    unset($wrapper);
+
+    $executed->set_output($this->html);
+    unset($this->html);
+
+
+    return $executed;
+  }
+
+  /**
+   * Implementation of pr_create_html_add_header_link_canonical().
+   */
+  protected function pr_create_html_add_header_link_canonical() {
+    $tag = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_LINK);
+    $tag->set_attribute(c_base_markup_attributes::ATTRIBUTE_REL, 'canonical');
+    $tag->set_attribute(c_base_markup_attributes::ATTRIBUTE_HREF, $this->settings['base_scheme'] . '://' . $this->settings['base_host'] . $this->settings['base_port'] . $this->settings['base_path'] . self::PATH_SELF);
+    $this->html->set_header($tag);
+
+    unset($tag);
+  }
+
+  /**
+   * Implements pr_get_title().
+   */
+  protected function pr_get_title($arguments = array()) {
+    return $this->pr_get_text(0, $arguments);
+  }
+
+  /**
+   * Implements pr_get_text().
+   */
+  protected function pr_get_text($code, $arguments = array()) {
+    switch ($code) {
+      case 0:
+        $string = 'Management Dashboard';
+        break;
+    }
+
+    if (!empty($arguments)) {
+      $this->pr_process_replacements($string, $arguments);
+    }
+
+    return $string;
+  }
+}
diff --git a/common/standard/paths/m/ja/dashboard.php b/common/standard/paths/m/ja/dashboard.php
new file mode 100644 (file)
index 0000000..359dccd
--- /dev/null
@@ -0,0 +1,29 @@
+<?php
+/**
+ * @file
+ * Provides path handler for the management dashboard.
+ */
+
+/**
+ * Implements c_standard_path_management_dashboard().
+ */
+class c_standard_path_management_dashboard_ja extends c_standard_path_management_dashboard {
+
+  /**
+   * Implements pr_get_text().
+   */
+  protected function pr_get_text($code, $arguments = array()) {
+    $string = '';
+    switch ($code) {
+      case 0:
+        $string = '管理ダッシュボード';
+        break;
+    }
+
+    if (!empty($arguments)) {
+      $this->pr_process_replacements($string, $arguments);
+    }
+
+    return $string;
+  }
+}
index d02790d19c10418d0e3c335b707bb0279824ac00..e2ea8caba02c893a9b169f5476cfd388a9734e55 100644 (file)
@@ -13,7 +13,7 @@ require_once('common/standard/classes/standard_path.php');
 require_once('common/theme/classes/theme_html.php');
 
 class c_standard_path_user_dashboard extends c_standard_path {
-  protected const PATH_DASHBOARD_USER = 'u/dashboard';
+  protected const PATH_SELF = 'u/dashboard';
 
   /**
    * Implements do_execute().
@@ -118,7 +118,7 @@ class c_standard_path_user_dashboard extends c_standard_path {
   protected function pr_create_html_add_header_link_canonical() {
     $tag = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_LINK);
     $tag->set_attribute(c_base_markup_attributes::ATTRIBUTE_REL, 'canonical');
-    $tag->set_attribute(c_base_markup_attributes::ATTRIBUTE_HREF, $this->settings['base_scheme'] . '://' . $this->settings['base_host'] . $this->settings['base_port'] . $this->settings['base_path'] . self::PATH_DASHBOARD_USER);
+    $tag->set_attribute(c_base_markup_attributes::ATTRIBUTE_HREF, $this->settings['base_scheme'] . '://' . $this->settings['base_host'] . $this->settings['base_port'] . $this->settings['base_path'] . self::PATH_SELF);
     $this->html->set_header($tag);
 
     unset($tag);