2012-06-20 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_ui.php, extensions/update_manager/lib/functions.php: uploaded lost changes. * include/functions_filemanager.php: cleaned source code style. * include/functions.php: added function "copy_dir" for use in the bug #3527247. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6627 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
5ea5a4cd89
commit
c93f4d3b20
|
@ -1,3 +1,13 @@
|
|||
2012-06-20 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_ui.php,
|
||||
extensions/update_manager/lib/functions.php: uploaded lost changes.
|
||||
|
||||
* include/functions_filemanager.php: cleaned source code style.
|
||||
|
||||
* include/functions.php: added function "copy_dir" for use in the
|
||||
bug #3527247.
|
||||
|
||||
2012-06-20 Vanessa Gil <vanessa.gil@artica.es>
|
||||
|
||||
* pandoradb_data.sql
|
||||
|
|
|
@ -463,7 +463,6 @@ function update_pandora_print_javascript_admin() {
|
|||
'</td>' +
|
||||
'<td style=" text-align:center; width:50px;"></td>' +
|
||||
'</tr>';
|
||||
console.log(row_html);
|
||||
$("tbody", "#online_packages").append(row_html); return;
|
||||
$("tbody", "#online_packages").append(
|
||||
);
|
||||
|
|
|
@ -116,7 +116,7 @@ function update_pandora_administration($settings, $user_key) {
|
|||
'</table>';
|
||||
|
||||
?>
|
||||
<div id="dialog_download" title="<?php echo __('Process packge'); ?>"
|
||||
<div id="dialog_download" title="<?php echo __('Processing package'); ?>"
|
||||
style="display:none;">
|
||||
<div style="position:absolute; top:10%; text-align: center; left:0%; right:0%; width:600px;">
|
||||
<?php
|
||||
|
|
|
@ -1532,4 +1532,23 @@ function get_periods () {
|
|||
return $periods;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Recursive copy directory
|
||||
*/
|
||||
function copy_dir($src, $dst) {
|
||||
$dir = opendir($src);
|
||||
@mkdir($dst);
|
||||
while(false !== ( $file = readdir($dir)) ) {
|
||||
if (( $file != '.' ) && ( $file != '..' )) {
|
||||
if ( is_dir($src . '/' . $file) ) {
|
||||
copy_dir($src . '/' . $file,$dst . '/' . $file);
|
||||
}
|
||||
else {
|
||||
copy($src . '/' . $file,$dst . '/' . $file);
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($dir);
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -328,7 +328,7 @@ if ($create_dir) {
|
|||
$delete_file = (bool) get_parameter ('delete_file');
|
||||
if ($delete_file) {
|
||||
global $config;
|
||||
|
||||
|
||||
$config['filemanager'] = array();
|
||||
$config['filemanager']['delete'] = 0;
|
||||
$config['filemanager']['message'] = null;
|
||||
|
@ -339,14 +339,15 @@ if ($delete_file) {
|
|||
$testHash = md5($filename . $config['dbpass']);
|
||||
|
||||
if ($hash != $testHash) {
|
||||
$config['filemanager']['message'] = ui_print_error_message(__('Security error'), '', true);
|
||||
$config['filemanager']['message'] = ui_print_error_message(__('Security error'), '', true);
|
||||
}
|
||||
else {
|
||||
$config['filemanager']['message'] = ui_print_success_message(__('Deleting'), '', true);
|
||||
if (is_dir ($filename)) {
|
||||
$config['filemanager']['message'] = ui_print_success_message(__('Deleted'), '', true);
|
||||
if (is_dir ($filename)) {
|
||||
rmdir ($filename);
|
||||
$config['filemanager']['delete'] = 1;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
unlink ($filename);
|
||||
$config['filemanager']['delete'] = 1;
|
||||
}
|
||||
|
|
|
@ -82,15 +82,22 @@ function ui_print_truncate_text($text, $numChars = GENERIC_SIZE_TEXT, $showTextI
|
|||
$text = io_safe_output($text);
|
||||
if (mb_strlen($text, "UTF-8") > ($numChars)) {
|
||||
$half_length = intval(($numChars - 3) / 2); // '/2' because [...] is in the middle of the word.
|
||||
|
||||
// Depending on the strange behavior of mb_strimwidth() itself,
|
||||
// the 3rd parameter is not to be $numChars but the length of original text (just means 'large enough').
|
||||
$truncateText2 = mb_strimwidth($text, (mb_strlen($text, "UTF-8") - $half_length), strlen($text), "", "UTF-8" );
|
||||
$truncateText2 = mb_strimwidth($text,
|
||||
(mb_strlen($text, "UTF-8") - $half_length), mb_strlen($text, "UTF-8"), "", "UTF-8" );
|
||||
|
||||
$truncateText = mb_strimwidth($text, 0,
|
||||
($numChars - $half_length), "", "UTF-8") . $suffix;
|
||||
|
||||
$truncateText = mb_strimwidth($text, 0, ($numChars - $half_length), $suffix, "UTF-8");
|
||||
$truncateText = $truncateText . $truncateText2;
|
||||
|
||||
if ($showTextInTitle) {
|
||||
if ($style !== false) {
|
||||
if ($style === null) {
|
||||
$truncateText = $truncateText;
|
||||
}
|
||||
else if ($style !== false) {
|
||||
$truncateText = '<span style="' . $style . '" title="'.$text.'">'.$truncateText.'</span>';
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue