Skip to content

Commit

Permalink
Modified php short open tags for environments that have disabled them.
Browse files Browse the repository at this point in the history
Visual improvements on search bar.
Filter icon is not shown if not using it.
If browser language does not have translation, or language not set, or is not a spanish variant, english is used.
Show maximum allowed file size for upload on edit account.
  • Loading branch information
nuxsmin committed Nov 14, 2013
1 parent ab69f1c commit 2b87c81
Show file tree
Hide file tree
Showing 22 changed files with 475 additions and 417 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
=== ** v1.0.4 ** ===

* [MOD] Modificadas etiquetas de inicio de código php.
* [MOD] Ajustes de visualización de barra de búsquedas.
* [MOD] No se muestra el icono de filtro de orden si no se usa.
* [MOD] Si el lenguaje del navegador no tiene traducción, ni está configurado en la aplicación, ni es ninguna varinte del español, se utiliza inglés.
* [MOD] Mostrar tamaño máximo de archivo permitido para subir al editar cuenta.

=== ** v1.0.3 ** ===

* [BUG] Corregido fallo al guardar filtro de búsqueda en la sesión.
Expand Down Expand Up @@ -147,6 +155,14 @@

---

=== ** v1.0.4 ** ===

* [MOD] Modified php short open tags for environments that have disabled them.
* [MOD] Visual improvements on search bar.
* [MOD] Filter icon is not shown if not using it.
* [MOD] If browser language does not have translation, or language not set, or is not a spanish variant, english is used.
* [MOD] Show maximum allowed file size for upload on edit account.

=== ** v1.0.3 ** ===

* [BUG] Fixed error on saving search filters in session.
Expand Down
20 changes: 10 additions & 10 deletions ajax/ajax_getFiles.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,18 @@

<form action="ajax/ajax_files.php" method="post" name="files_form" id="files_form">
<select name="fileId" size="4" class="files" id="files">
<? foreach ($files as $file): ?>
<option value='<? echo $file['id']; ?>'><? echo $file['name'] ?> (<? echo $file['size']; ?> KB)</option>
<? endforeach;?>
<?php foreach ($files as $file): ?>
<option value='<?php echo $file['id']; ?>'><?php echo $file['name'] ?> (<?php echo $file['size']; ?> KB)</option>
<?php endforeach;?>
</select>
<input name="t" type="hidden" id="t" value="<? echo time(); ?>" />
<input name="sk" type="hidden" id="sk" value="<? echo SP_Common::getSessionKey(); ?>" />
<input name="t" type="hidden" id="t" value="<?php echo time(); ?>" />
<input name="sk" type="hidden" id="sk" value="<?php echo SP_Common::getSessionKey(); ?>" />
<input name="action" type="hidden" id="action" value="download" />
</form>
<div class="actionFiles">
<img src="imgs/download.png" title="<? echo _('Descargar archivo'); ?>" id="btnDownload" class="inputImg" alt="download" OnClick="downFile();" />
<img src="imgs/view.png" title="<? echo _('Ver archivo'); ?>" id="btnView" class="inputImg" alt="View" OnClick="downFile(1);" />
<? if ( $deleteEnabled === 1 ): ?>
<img src="imgs/delete.png" title="<? echo _('Eliminar archivo'); ?>" id="btnDelete" class="inputImg" alt="Delete" OnClick="delFile(<? echo $accountId; ?>);" />
<? endif; ?>
<img src="imgs/download.png" title="<?php echo _('Descargar archivo'); ?>" id="btnDownload" class="inputImg" alt="download" OnClick="downFile();" />
<img src="imgs/view.png" title="<?php echo _('Ver archivo'); ?>" id="btnView" class="inputImg" alt="View" OnClick="downFile(1);" />
<?php if ( $deleteEnabled === 1 ): ?>
<img src="imgs/delete.png" title="<?php echo _('Eliminar archivo'); ?>" id="btnDelete" class="inputImg" alt="Delete" OnClick="delFile(<?php echo $accountId; ?>);" />
<?php endif; ?>
</div>
20 changes: 10 additions & 10 deletions ajax/ajax_usrpass.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,41 +45,41 @@
?>

<div id="fancyContainer" align="center">
<h2 class="midround"><? echo _('Cambio de Clave'); ?></h2>
<h2 class="midround"><?php echo _('Cambio de Clave'); ?></h2>
<form method="post" name="updUsrPass" id="frmUpdUsrPass">
<table class="fancydata">
<tr>
<td class="descField">
<? echo _('Clave'); ?>
<?php echo _('Clave'); ?>
</td>
<td class="valField">
<input type="password" id="usrpass" name="pass" title="<? echo _('Clave'); ?>" class="txtpass" OnFocus="$('#passLevel').show(); $('#resFancyAccion').hide();" OnKeyUp="checkPassLevel(this.value, 'fancyContainer')" />
<img src="imgs/genpass.png" title="<? echo _('Generar clave aleatoria'); ?>" class="inputImg" OnClick="$('#resFancyAccion').hide(); password(11,true,false,'fancyContainer');" />
<input type="password" id="usrpass" name="pass" title="<?php echo _('Clave'); ?>" class="txtpass" OnFocus="$('#passLevel').show(); $('#resFancyAccion').hide();" OnKeyUp="checkPassLevel(this.value, 'fancyContainer')" />
<img src="imgs/genpass.png" title="<?php echo _('Generar clave aleatoria'); ?>" class="inputImg" OnClick="$('#resFancyAccion').hide(); password(11,true,false,'fancyContainer');" />
</td>
</tr>
<tr>
<td class="descField">
<? echo _('Clave (repetir)'); ?></td>
<?php echo _('Clave (repetir)'); ?></td>
<td class="valField">
<input type="password" id="usrpassv" name="passv" title="<? echo _('Clave (repetir)'); ?>" class="txtpassv" />
<input type="password" id="usrpassv" name="passv" title="<?php echo _('Clave (repetir)'); ?>" class="txtpassv" />
</td>
</tr>
</table>
<input type="hidden" name="id" value="<? echo $userId; ?>" />
<input type="hidden" name="id" value="<?php echo $userId; ?>" />
<input type="hidden" name="type" value="1" />
<input type="hidden" name="action" value="3" />
<input type="hidden" name="sk" value="<? echo SP_Common::getSessionKey(); ?>">
<input type="hidden" name="sk" value="<?php echo SP_Common::getSessionKey(); ?>">
</form>

<div id="resCheck">
<span id="passLevel" title="<? echo _('Nivel de fortaleza de la clave'); ?>" ></span>
<span id="passLevel" title="<?php echo _('Nivel de fortaleza de la clave'); ?>" ></span>
<BR><BR>
<span id="resFancyAccion"></span>
</div>
<div class="action-in-box">
<ul>
<li>
<img src="imgs/check.png" title="<? echo _('Guardar'); ?>" class="inputImg" OnClick="usersMgmt('frmUpdUsrPass')" alt="<? echo _('Guardar'); ?>"/>
<img src="imgs/check.png" title="<?php echo _('Guardar'); ?>" class="inputImg" OnClick="usersMgmt('frmUpdUsrPass')" alt="<?php echo _('Guardar'); ?>"/>
</li>
</ul>
</div>
Expand Down
34 changes: 34 additions & 0 deletions config/config.php.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php
$CONFIG = array (
'passwordsalt' => '68a77aa997d934d1259e729607233a',
'version' => '1.0.3',
'dbhost' => 'localhost',
'dbname' => 'syspass',
'debug' => 0,
'logenabled' => 1,
'ldapenabled' => 0,
'mailenabled' => 0,
'dbuser' => 'sp_admin',
'dbpass' => 'mydb_secret_pass',
'installed' => 0,
'wikienabled' => 0,
'demoenabled' => 0,
'allowed_exts' => 'BAK,CSV,DOC,DOCX,GIF,JPG,ODS,ODT,PDF,PNG,TXT,VSD,XLS,XSL',
'allowed_size' => 1024,
'wikisearchurl' => 'http://wiki.foobar.com/wiki/doku.php/start?do=search&id=',
'wikipageurl' => 'http://wiki.foobar.com/doku.php/',
'wikifilter' => 'srv-',
'ldapserver' => '',
'ldapbase' => '',
'ldapgroup' => '',
'ldapuserattr' => '',
'mailserver' => 'mail.foobar.com',
'mailfrom' => '[email protected]',
'session_timeout' => 600,
'account_link' => 1,
'account_count' => 10,
'sitelang' => 'en_US',
'maintenance' => 0,
'checkupdates' => 1,
'filesenabled' => 1
);
9 changes: 5 additions & 4 deletions css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ A:focus {text-decoration: none; color: #FF0000;}
color: #696969;
}
#content .data-header li a{color: #777;}
#content .data-header li img{width: 24px; height: 24px; vertical-align: middle;}
#content .data-header li img{float: right; width: 24px; height: 24px; vertical-align: middle;}

#content .data-rows ul{
display: table;
Expand Down Expand Up @@ -432,16 +432,17 @@ A:focus {text-decoration: none; color: #FF0000;}
#content #resEventLog .cell{text-align: center;}
#content #resEventLog .cell-description{width: 60%;}

#content #tblTools SELECT, #tblTools INPUT{margin-left: 15px;}
#content #tblTools div.chosen-container{margin: 0 5px;}
#content #tblTools select {width: 210px;}
#content #tblTools #txtSearch{width:30%;}
#content #tblTools #txtSearch,
#content #tblTools select {width: 220px;}
#content #tblTools LABEL{margin-left:15px; color: #999;}
#content #tblTools IMG{margin-left:0.5em;}
#content #tblTools #toolsLeft{text-align: left; width: 80%;}
#content #tblTools #toolsRight{text-align: right; width: 5%;}
#content #tblTools #toolsRight input{margin-left: 15px; text-align: center;}
#content #tblTools .custom-combobox{margin-left: 25px;}
#content #tblTools #btnClear{opacity: 0.35;filter:alpha(opacity=35);}
#content #tblTools #btnClear:hover{opacity: 1;filter:alpha(opacity=100);}

#content #tabs>DIV{min-height: 475px;}
#content #tabs.ui-widget-content {border: none; background-color: transparent;}
Expand Down
13 changes: 10 additions & 3 deletions inc/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -391,14 +391,21 @@ public static function initError($str, $hint = ''){
* @brief Establece el lenguaje de la aplicación
* @returns none
*
* Esta función establece el lenguaje según esté definidi en la configuración o en el navegador.
* Esta función establece el lenguaje según esté definido en la configuración o en el navegador.
*/
private static function selectLang(){
$browserLang = str_replace("-","_",substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 5));
$configLang = SP_Config::getValue('sitelang');

self::$LANG = ( $configLang ) ? $configLang : $browserLang;

// Establecer a en_US si no existe la traducción o no es español
if ( ! file_exists( self::$SERVERROOT.'/inc/locales/'.$browserLang)
&& ! preg_match('/^es_.*/i',$browserLang)
&& ! $configLang ){
self::$LANG = 'en_US';
} else{
self::$LANG = ( $configLang ) ? $configLang : $browserLang;
}

putenv("LANG=".self::$LANG);
setlocale(LC_MESSAGES, self::$LANG);
setlocale(LC_ALL, self::$LANG);
Expand Down
Binary file modified inc/locales/en_US/LC_MESSAGES/messages.mo
Binary file not shown.
Loading

0 comments on commit 2b87c81

Please sign in to comment.