Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/upstream/master' into jux-action
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter van Westen committed Oct 9, 2013
2 parents 1f708e8 + 44ab13e commit b694d7c
Show file tree
Hide file tree
Showing 282 changed files with 12,106 additions and 5,165 deletions.
23 changes: 22 additions & 1 deletion administrator/components/com_admin/models/profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,19 @@ public function getForm($data = array(), $loadData = true)
{
return false;
}
if (!JComponentHelper::getParams('com_users')->get('change_login_name'))

// Check for username compliance and parameter set
$usernameCompliant = true;

if ($this->loadFormData()->username)
{
$username = $this->loadFormData()->username;
$isUsernameCompliant = !(preg_match('#[<>"\'%;()&\\s\\\\]|\\.\\./#', $username) || strlen(utf8_decode($username)) < 2);
}

$this->setState('user.username.compliant', $isUsernameCompliant);

if (!JComponentHelper::getParams('com_users')->get('change_login_name') && $isUsernameCompliant)
{
$form->setFieldAttribute('username', 'required', 'false');
$form->setFieldAttribute('username', 'readonly', 'true');
Expand Down Expand Up @@ -105,6 +117,15 @@ public function save($data)
unset($data['sendEmail']);
unset($data['block']);

// Unset the username if it should not be overwritten
$username = $data['username'];
$isUsernameCompliant = $this->getState('user.username.compliant');

if (!JComponentHelper::getParams('com_users')->get('change_login_name') && $isUsernameCompliant)
{
unset($data['username']);
}

// Bind the data.
if (!$user->bind($data))
{
Expand Down
5 changes: 5 additions & 0 deletions administrator/components/com_admin/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ class JoomlaInstallerScript
*/
public function update($installer)
{
$options['format'] = '{DATE}\t{TIME}\t{LEVEL}\t{CODE}\t{MESSAGE}';
$options['text_file'] = 'joomla_update.php';
JLog::addLogger($options, JLog::INFO, array('Update', 'databasequery', 'jerror'));
JLog::add(JText::_('COM_JOOMLAUPDATE_UPDATE_LOG_DELETE_FILES'), JLog::INFO, 'Update');

$this->deleteUnexistingFiles();
$this->updateManifestCaches();
$this->updateDatabase();
Expand Down
4 changes: 2 additions & 2 deletions administrator/components/com_banners/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<field
name="track_impressions"
type="radio"
class="btn-group"
class="btn-group btn-group-yesno"
default="0"
label="COM_BANNERS_FIELD_TRACKIMPRESSION_LABEL"
description="COM_BANNERS_FIELD_TRACKIMPRESSION_DESC">
Expand All @@ -39,7 +39,7 @@
<field
name="track_clicks"
type="radio"
class="btn-group"
class="btn-group btn-group-yesno"
default="0"
label="COM_BANNERS_FIELD_TRACKCLICK_LABEL"
description="COM_BANNERS_FIELD_TRACKCLICK_DESC">
Expand Down
22 changes: 13 additions & 9 deletions administrator/components/com_banners/models/forms/banner.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,25 @@
readonly="true" class="readonly"
label="JGLOBAL_FIELD_ID_LABEL" description ="JGLOBAL_FIELD_ID_DESC" />

<field name="name" type="text" class="inputbox"
<field name="name" type="text"
class="inputbox input-xxlarge input-large-text"
size="40" label="COM_BANNERS_FIELD_NAME_LABEL"
description="COM_BANNERS_FIELD_NAME_DESC" required="true" />

<field name="alias" type="text" class="inputbox"
size="40" label="JFIELD_ALIAS_LABEL"
description="COM_BANNERS_FIELD_ALIAS_DESC" />
description="COM_BANNERS_FIELD_ALIAS_DESC"
hint="JFIELD_ALIAS_PLACEHOLDER" />

<field name="catid" type="categoryedit" extension="com_banners"
label="JCATEGORY" description="COM_BANNERS_FIELD_CATEGORY_DESC"
class="inputbox" required="true"
addfieldpath="/administrator/components/com_categories/models/fields" />

<field name="state" type="list"
label="JSTATUS" description="COM_BANNERS_FIELD_STATE_DESC"
class="inputbox span12 small" size="1" default="1" >
class="chzn-color-state"
size="1" default="1" >
<option value="1">JPUBLISHED</option>
<option value="0">JUNPUBLISHED</option>
<option value="2">JARCHIVED</option>
Expand Down Expand Up @@ -102,10 +105,10 @@
<fieldset name="bannerdetails"
label="COM_BANNERS_GROUP_LABEL_BANNER_DETAILS" >

<field name="sticky" type="list" default="0"
<field name="sticky" type="radio" default="0"
label="COM_BANNERS_FIELD_STICKY_LABEL"
description="COM_BANNERS_FIELD_STICKY_DESC"
class="span12 small" >
class="btn-group btn-group-yesno">
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
Expand Down Expand Up @@ -166,7 +169,8 @@
rows="3" cols="30" label="JFIELD_META_KEYWORDS_LABEL"
description="COM_BANNERS_FIELD_METAKEYWORDS_DESC" />

<field name="own_prefix" type="radio" class="btn-group"
<field name="own_prefix" type="radio"
class="btn-group btn-group-yesno"
label="COM_BANNERS_FIELD_BANNEROWNPREFIX_LABEL"
description="COM_BANNERS_FIELD_BANNEROWNPREFIX_DESC"
default="0">
Expand All @@ -187,11 +191,11 @@
description="COM_BANNERS_FIELD_IMAGE_DESC" />

<field name="width" type="text"
class="inputbox validate-numeric" label="COM_BANNERS_FIELD_WIDTH_LABEL"
class="inputbox input-mini validate-numeric" label="COM_BANNERS_FIELD_WIDTH_LABEL"
description="COM_BANNERS_FIELD_WIDTH_DESC" />

<field name="height" type="text"
class="inputbox validate-numeric" label="COM_BANNERS_FIELD_HEIGHT_LABEL"
class="inputbox input-mini validate-numeric" label="COM_BANNERS_FIELD_HEIGHT_LABEL"
description="COM_BANNERS_FIELD_HEIGHT_DESC" />

<field name="alt" type="text" class="inputbox"
Expand Down
19 changes: 12 additions & 7 deletions administrator/components/com_banners/models/forms/client.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@



<field name="name" type="text" class="inputbox"
size="40" label="COM_BANNERS_FIELD_CLIENT_NAME_LABEL"
<field name="name" type="text"
class="inputbox input-xxlarge input-large-text"
size="40" label="COM_BANNERS_FIELD_NAME_LABEL"
description="COM_BANNERS_FIELD_CLIENT_NAME_DESC"
required="true" />

Expand All @@ -25,7 +26,7 @@

<field name="state" type="list"
label="JSTATUS" description="COM_BANNERS_FIELD_CLIENT_STATE_DESC"
class="inputbox" size="1" default="1"
class="chzn-color-state" size="1" default="1"
>
<option value="1">JPUBLISHED</option>
<option value="0">JUNPUBLISHED</option>
Expand All @@ -52,6 +53,7 @@
</field>

<field name="track_impressions" type="list" default="0"
class="chzn-color"
label="COM_BANNERS_FIELD_TRACKIMPRESSION_LABEL"
description="COM_BANNERS_FIELD_TRACKIMPRESSION_DESC"
>
Expand All @@ -61,6 +63,7 @@
</field>

<field name="track_clicks" type="list" default="0"
class="chzn-color"
label="COM_BANNERS_FIELD_TRACKCLICK_LABEL" description="COM_BANNERS_FIELD_TRACKCLICK_DESC"
>
<option value="">JGLOBAL_USE_GLOBAL</option>
Expand All @@ -78,7 +81,8 @@
rows="3" cols="30" label="JFIELD_META_KEYWORDS_LABEL"
description="COM_BANNERS_FIELD_CLIENT_METAKEYWORDS_DESC" />

<field name="own_prefix" type="radio" class="btn-group"
<field name="own_prefix" type="radio"
class="btn-group btn-group-yesno"
label="COM_BANNERS_FIELD_CLIENTOWNPREFIX_LABEL"
description="COM_BANNERS_FIELD_CLIENTOWNPREFIX_DESC"
default="0"
Expand All @@ -93,10 +97,11 @@

</fieldset>

<fieldset name="extra" label="Banners_Extra">
<fieldset name="extra" label="COM_BANNERS_EXTRA">

<field name="extrainfo" type="textarea" class="inputbox"
rows="10" cols="40" label="COM_BANNERS_FIELD_EXTRAINFO_LABEL"
<field name="extrainfo" type="textarea"
class="inputbox span12"
rows="5" cols="80" label="COM_BANNERS_FIELD_EXTRAINFO_LABEL"
description="COM_BANNERS_FIELD_EXTRAINFO_DESC" />

</fieldset>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<form>
<fieldset name="details">

<field name="compressed" type="radio" class="btn-group"
<field name="compressed" type="radio" class="btn-group btn-group-yesno"
label="COM_BANNERS_FIELD_COMPRESSED_LABEL"
description="COM_BANNERS_FIELD_COMPRESSED_DESC"
default="0"
Expand Down
Loading

0 comments on commit b694d7c

Please sign in to comment.