Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
tenzap committed Jul 6, 2023
2 parents 5ef8009 + 29f249b commit 8465ea5
Show file tree
Hide file tree
Showing 106 changed files with 5,146 additions and 9,787 deletions.
365 changes: 216 additions & 149 deletions .github/workflows/packaging.yml

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ application/config/database.php
/vendor/
.php-cs-fixer.cache
/dist

/utils/launchpad/dput.cf
4 changes: 2 additions & 2 deletions application/config/kalkun_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
| https://github.com/kalkun-sms/Kalkun/wiki/Developing#Version-numbering-guidelines
|
*/
$config['kalkun_version'] = '0.8.0';
$config['kalkun_version'] = '0.8.1-beta-1';
$config['kalkun_codename'] = '-';
$config['kalkun_release_date'] = '2022-10-14';
$config['kalkun_release_date'] = '-';

/*
|--------------------------------------------------------------------------
Expand Down
28 changes: 27 additions & 1 deletion application/controllers/Kalkun.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ function unread_count()
function add_folder()
{
$this->Kalkun_model->add_folder();
redirect($this->input->post('source_url'));
redirect($this->input->post('source_url') !== NULL ? $this->input->post('source_url') : '');
}

// --------------------------------------------------------------------
Expand Down Expand Up @@ -376,6 +376,32 @@ function phone_number_validation()
echo json_encode($result);
}

// --------------------------------------------------------------------

/**
* Check multiple phone number validity
*
* returns a json string used by jquery validation plugin
* "true" if all phone numbers are valid
* "an error message with the faulty number" if not
*/
function phone_number_validation_multiple()
{
$tmp_dest = explode(',', $this->input->get_post('phone'));
foreach ($tmp_dest as $key => $val)
{
$result = is_phone_number_valid($val, $this->input->get_post('region'));
if ($result !== TRUE)
{
header('Content-type: application/json');
echo json_encode($result.' ('.trim($val).')');
return;
}
}
header('Content-type: application/json');
echo json_encode('true');
}

function get_csrf_hash()
{
header('Content-type: application/json');
Expand Down
2 changes: 1 addition & 1 deletion application/controllers/Messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ function compose_process()
$tmp_dest = explode(',', $this->input->post('manualvalue'));
foreach ($tmp_dest as $key => $tmp)
{
$this->_phone_number_validation($this->input->post('manualvalue'));
$this->_phone_number_validation($tmp);
$dest[$key] = phone_format_e164($tmp);
}
break;
Expand Down
8 changes: 4 additions & 4 deletions application/core/MY_Lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class MY_Lang extends MX_Lang {
'hungarian' => 'hu',
'indonesian' => 'in',
'italian' => 'it',
'norwegian' => 'no',
'polish' => 'pl',
'portuguese' => 'pt',
'russian' => 'ru',
Expand Down Expand Up @@ -101,8 +102,7 @@ public function load($langfile, $idiom = '', $return = FALSE, $add_suffix = TRUE
}
if ($alt_path !== '')
{
$alt_path .= 'language/'.$this->idiom.'/'.$langfile;
if (file_exists($alt_path))
if (file_exists($alt_path.'language/'.$this->idiom.'/'.$langfile))
{
$found = TRUE;
}
Expand All @@ -123,7 +123,7 @@ public function load($langfile, $idiom = '', $return = FALSE, $add_suffix = TRUE
// Fallback to english if language file is not found
if ( ! $found)
{
log_message('error', "language file ${langfile} not found. Falling back to english.");
log_message('error', "language file {$langfile} not found. Falling back to english.");
$requested_idiom = 'english';
}

Expand Down Expand Up @@ -394,7 +394,7 @@ public function get_jquery_datepicker_regional($jquery_i18n_path)
if ( ! isset($this->jquery_datepicker_regional))
{
$datepicker_locales = [];
foreach (glob("${jquery_i18n_path}/datepicker-*.js") as $filename)
foreach (glob("{$jquery_i18n_path}/datepicker-*.js") as $filename)
{
$res = preg_match('/datepicker-(.*)\.js/', $filename, $matches);
array_push($datepicker_locales, $matches[1]);
Expand Down
66 changes: 66 additions & 0 deletions application/language/norwegian/date_lang.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?php
/**
* System messages translation for CodeIgniter(tm)
*
* @author CodeIgniter community
* @copyright Copyright (c) 2014-2019, British Columbia Institute of Technology (https://bcit.ca/)
* @license http://opensource.org/licenses/MIT MIT License
* @link https://codeigniter.com
*/
defined('BASEPATH') OR exit('No direct script access allowed');

$lang['date_year'] = 'År';
$lang['date_years'] = 'År';
$lang['date_month'] = 'Måned';
$lang['date_months'] = 'Måneder';
$lang['date_week'] = 'Uke';
$lang['date_weeks'] = 'Uker';
$lang['date_day'] = 'Dag';
$lang['date_days'] = 'Dager';
$lang['date_hour'] = 'Time';
$lang['date_hours'] = 'Timer';
$lang['date_minute'] = 'Minutt';
$lang['date_minutes'] = 'Minutter';
$lang['date_second'] = 'Sekund';
$lang['date_seconds'] = 'Sekunder';

$lang['UM12'] = '(UTC -12:00) Baker/Howland Island';
$lang['UM11'] = '(UTC -11:00) Niue';
$lang['UM10'] = '(UTC -10:00) Hawaii-Aleutian Standard Time, Cook Islands, Tahiti';
$lang['UM95'] = '(UTC -9:30) Marquesas Islands';
$lang['UM9'] = '(UTC -9:00) Alaska Standard Time, Gambier Islands';
$lang['UM8'] = '(UTC -8:00) Pacific Standard Time, Clipperton Island';
$lang['UM7'] = '(UTC -7:00) Mountain Standard Time';
$lang['UM6'] = '(UTC -6:00) Central Standard Time';
$lang['UM5'] = '(UTC -5:00) Eastern Standard Time, Western Caribbean Standard Time';
$lang['UM45'] = '(UTC -4:30) Venezuelan Standard Time';
$lang['UM4'] = '(UTC -4:00) Atlantic Standard Time, Eastern Caribbean Standard Time';
$lang['UM35'] = '(UTC -3:30) Newfoundland Standard Time';
$lang['UM3'] = '(UTC -3:00) Argentina, Brazil, French Guiana, Uruguay';
$lang['UM2'] = '(UTC -2:00) South Georgia/South Sandwich Islands';
$lang['UM1'] = '(UTC -1:00) Azores, Cape Verde Islands';
$lang['UTC'] = '(UTC) Greenwich Mean Time, Western European Time';
$lang['UP1'] = '(UTC +1:00) Central European Time, West Africa Time';
$lang['UP2'] = '(UTC +2:00) Central Africa Time, Eastern European Time, Kaliningrad Time';
$lang['UP3'] = '(UTC +3:00) Moscow Time, East Africa Time, Arabia Standard Time';
$lang['UP35'] = '(UTC +3:30) Iran Standard Time';
$lang['UP4'] = '(UTC +4:00) Azerbaijan Standard Time, Samara Time';
$lang['UP45'] = '(UTC +4:30) Afghanistan';
$lang['UP5'] = '(UTC +5:00) Pakistan Standard Time, Yekaterinburg Time';
$lang['UP55'] = '(UTC +5:30) Indian Standard Time, Sri Lanka Time';
$lang['UP575'] = '(UTC +5:45) Nepal Time';
$lang['UP6'] = '(UTC +6:00) Bangladesh Standard Time, Bhutan Time, Omsk Time';
$lang['UP65'] = '(UTC +6:30) Cocos Islands, Myanmar';
$lang['UP7'] = '(UTC +7:00) Krasnoyarsk Time, Cambodia, Laos, Thailand, Vietnam';
$lang['UP8'] = '(UTC +8:00) Australian Western Standard Time, Beijing Time, Irkutsk Time';
$lang['UP875'] = '(UTC +8:45) Australian Central Western Standard Time';
$lang['UP9'] = '(UTC +9:00) Japan Standard Time, Korea Standard Time, Yakutsk Time';
$lang['UP95'] = '(UTC +9:30) Australian Central Standard Time';
$lang['UP10'] = '(UTC +10:00) Australian Eastern Standard Time, Vladivostok Time';
$lang['UP105'] = '(UTC +10:30) Lord Howe Island';
$lang['UP11'] = '(UTC +11:00) Srednekolymsk Time, Solomon Islands, Vanuatu';
$lang['UP115'] = '(UTC +11:30) Norfolk Island';
$lang['UP12'] = '(UTC +12:00) Fiji, Gilbert Islands, Kamchatka Time, New Zealand Standard Time';
$lang['UP1275'] = '(UTC +12:45) Chatham Islands Standard Time';
$lang['UP13'] = '(UTC +13:00) Samoa Time Zone, Phoenix Islands Time, Tonga';
$lang['UP14'] = '(UTC +14:00) Line Islands';
11 changes: 11 additions & 0 deletions application/language/norwegian/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>

<p>Directory access is forbidden.</p>

</body>
</html>
Loading

0 comments on commit 8465ea5

Please sign in to comment.