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>
|
2012-06-20 Vanessa Gil <vanessa.gil@artica.es>
|
||||||
|
|
||||||
* pandoradb_data.sql
|
* pandoradb_data.sql
|
||||||
|
|
|
@ -463,7 +463,6 @@ function update_pandora_print_javascript_admin() {
|
||||||
'</td>' +
|
'</td>' +
|
||||||
'<td style=" text-align:center; width:50px;"></td>' +
|
'<td style=" text-align:center; width:50px;"></td>' +
|
||||||
'</tr>';
|
'</tr>';
|
||||||
console.log(row_html);
|
|
||||||
$("tbody", "#online_packages").append(row_html); return;
|
$("tbody", "#online_packages").append(row_html); return;
|
||||||
$("tbody", "#online_packages").append(
|
$("tbody", "#online_packages").append(
|
||||||
);
|
);
|
||||||
|
|
|
@ -116,7 +116,7 @@ function update_pandora_administration($settings, $user_key) {
|
||||||
'</table>';
|
'</table>';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<div id="dialog_download" title="<?php echo __('Process packge'); ?>"
|
<div id="dialog_download" title="<?php echo __('Processing package'); ?>"
|
||||||
style="display:none;">
|
style="display:none;">
|
||||||
<div style="position:absolute; top:10%; text-align: center; left:0%; right:0%; width:600px;">
|
<div style="position:absolute; top:10%; text-align: center; left:0%; right:0%; width:600px;">
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -1532,4 +1532,23 @@ function get_periods () {
|
||||||
return $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);
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -342,11 +342,12 @@ if ($delete_file) {
|
||||||
$config['filemanager']['message'] = ui_print_error_message(__('Security error'), '', true);
|
$config['filemanager']['message'] = ui_print_error_message(__('Security error'), '', true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$config['filemanager']['message'] = ui_print_success_message(__('Deleting'), '', true);
|
$config['filemanager']['message'] = ui_print_success_message(__('Deleted'), '', true);
|
||||||
if (is_dir ($filename)) {
|
if (is_dir ($filename)) {
|
||||||
rmdir ($filename);
|
rmdir ($filename);
|
||||||
$config['filemanager']['delete'] = 1;
|
$config['filemanager']['delete'] = 1;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
unlink ($filename);
|
unlink ($filename);
|
||||||
$config['filemanager']['delete'] = 1;
|
$config['filemanager']['delete'] = 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,15 +82,22 @@ function ui_print_truncate_text($text, $numChars = GENERIC_SIZE_TEXT, $showTextI
|
||||||
$text = io_safe_output($text);
|
$text = io_safe_output($text);
|
||||||
if (mb_strlen($text, "UTF-8") > ($numChars)) {
|
if (mb_strlen($text, "UTF-8") > ($numChars)) {
|
||||||
$half_length = intval(($numChars - 3) / 2); // '/2' because [...] is in the middle of the word.
|
$half_length = intval(($numChars - 3) / 2); // '/2' because [...] is in the middle of the word.
|
||||||
|
|
||||||
// Depending on the strange behavior of mb_strimwidth() itself,
|
// 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').
|
// 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;
|
$truncateText = $truncateText . $truncateText2;
|
||||||
|
|
||||||
if ($showTextInTitle) {
|
if ($showTextInTitle) {
|
||||||
if ($style !== false) {
|
if ($style === null) {
|
||||||
|
$truncateText = $truncateText;
|
||||||
|
}
|
||||||
|
else if ($style !== false) {
|
||||||
$truncateText = '<span style="' . $style . '" title="'.$text.'">'.$truncateText.'</span>';
|
$truncateText = '<span style="' . $style . '" title="'.$text.'">'.$truncateText.'</span>';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue