diff --git a/e107_core/shortcodes/batch/user_shortcodes.php b/e107_core/shortcodes/batch/user_shortcodes.php
index 11f944991..3288158fe 100644
--- a/e107_core/shortcodes/batch/user_shortcodes.php
+++ b/e107_core/shortcodes/batch/user_shortcodes.php
@@ -524,23 +524,40 @@ function sc_user_email($parm='')
function sc_user_update_link($parm)
{
- $url = e107::getUrl();
+ $label = null;
+
if (USERID == $this->var['user_id'])
{
- //return "".LAN_USER_38."";
- //return "".LAN_USER_38.""; // TODO: repair dirty fix for usersettings
- return "".LAN_USER_38.""; // TODO: repair dirty fix for usersettings
+ $label = LAN_USER_38;
}
else if(ADMIN && getperms("4") && !$this->var['user_admin'])
{
- $editUrl = e_ADMIN_ABS."users.php?mode=main&action=edit&id=".$this->var['user_id'];
-
- return "".LAN_USER_39."";
-
- // return " $this->var['user_id'], 'name' => $this->var['user_name']))."'>".LAN_USER_39."";
-
+ $label = LAN_USER_39;
}
+
+ if(empty($label))
+ {
+ return null;
+ }
+
+ return "".$label."";
+
}
+
+ function sc_user_settings_url($parm=null)
+ {
+
+ if (USERID == $this->var['user_id'])
+ {
+ return e107::getUrl()->create('user/myprofile/edit');
+ }
+ else if(ADMIN && getperms("4") && !$this->var['user_admin'])
+ {
+ return e_ADMIN_ABS."users.php?mode=main&action=edit&id=".$this->var['user_id'];
+ }
+
+ }
+
diff --git a/e107_handlers/application.php b/e107_handlers/application.php
index 0f6f9b85e..4b80f1f5f 100644
--- a/e107_handlers/application.php
+++ b/e107_handlers/application.php
@@ -257,6 +257,9 @@ class eFront
* @var eRouter
*/
protected $_router;
+
+
+ protected $_response;
/**
* @var string path to file to include - the old deprecated way of delivering content
@@ -391,7 +394,7 @@ class eFront
$router = new eRouter();
$this->setRouter($router);
- // $response = new eResponse();
+ /** @var eResponse $response */
$response = e107::getSingleton('eResponse');
$this->setResponse($response);
@@ -1626,9 +1629,9 @@ class eRouter
*/
public function getAliases($lanCode = null)
{
- if($lan)
+ if($lanCode)
{
- return e107::findPref('url_aliases/'.$lan, array());
+ return e107::findPref('url_aliases/'.$lanCode, array());
}
return $this->_aliases;
}
@@ -4133,7 +4136,7 @@ class eResponse
/**
* Get content
- * @param str $ns
+ * @param string $ns
* @param boolean $reset
* @return string
*/
@@ -4150,8 +4153,8 @@ class eResponse
}
/**
- * @param str $title
- * @param str $ns
+ * @param string $title
+ * @param string $ns
* @return eResponse
*/
function setTitle($title, $ns = 'default')
@@ -4169,8 +4172,8 @@ class eResponse
}
/**
- * @param str $title
- * @param str $ns
+ * @param string $title
+ * @param string $ns
* @return eResponse
*/
function appendTitle($title, $ns = 'default')
@@ -4192,8 +4195,8 @@ class eResponse
}
/**
- * @param str $title
- * @param str $ns
+ * @param string $title
+ * @param string $ns
* @return eResponse
*/
function prependTitle($title, $ns = 'default')
@@ -4216,7 +4219,7 @@ class eResponse
/**
* Assemble title
- * @param str $ns
+ * @param string $ns
* @param bool $reset
* @return string
*/