Revize 2470
Přidáno uživatelem Ondřej Fibich před více než 9 roky(ů)
freenetis/trunk/application/controllers/address_points.php | ||
---|---|---|
$members = array
|
||
(
|
||
NULL => '----- '.__('Select member').' -----'
|
||
) + Member_Model::select_list_grouped();
|
||
) + ORM::factory('member')->select_list_grouped();
|
||
|
||
// form to group by type
|
||
$form = new Forge(url::base(TRUE).url::current(TRUE));
|
freenetis/trunk/application/controllers/ifaces.php | ||
---|---|---|
$im = new Iface_Model();
|
||
|
||
// iface type doesn't exist
|
||
if (!$im->get_type($type))
|
||
if (!Iface_Model::get_type($type))
|
||
{
|
||
Controller::error(RECORD);
|
||
}
|
||
... | ... | |
}
|
||
|
||
// iface type doesn't exist
|
||
if (!$iface->get_type($type))
|
||
if (!Iface_Model::get_type($type))
|
||
{
|
||
// some wrong added ifaces from the past may have type set to zero
|
||
if ($type == 0)
|
||
... | ... | |
// this code resolves (#310)
|
||
else if ($old_type != $iface->type)
|
||
{
|
||
$mediums = $iface->get_types_has_link_with_medium($iface->type);
|
||
$mediums = Iface_Model::get_types_has_link_with_medium($iface->type);
|
||
|
||
if ($iface->link_id &&
|
||
!array_key_exists($iface->link->medium, $mediums))
|
freenetis/trunk/application/controllers/js.php | ||
---|---|---|
|
||
if ($iface && $iface->id)
|
||
{
|
||
if (!ORM::factory('iface')->get_type($type))
|
||
if (!Iface_Model::get_type($type))
|
||
{
|
||
$type = $iface->type;
|
||
}
|
freenetis/trunk/application/controllers/links.php | ||
---|---|---|
|
||
$filter_form->add('medium')
|
||
->type('select')
|
||
->values($link_model->get_medium_types());
|
||
->values(Link_Model::get_medium_types());
|
||
|
||
$filter_form->add('bitrate')
|
||
->type('number');
|
freenetis/trunk/application/controllers/notifications.php | ||
---|---|---|
}
|
||
// activate redirection
|
||
if (module::e('redirection') && $activate_redir &&
|
||
$message->has_redirection_content($message->type))
|
||
Message_Model::has_redirection_content($message->type))
|
||
{
|
||
try
|
||
{
|
||
... | ... | |
}
|
||
// activate E-mail notification
|
||
if (module::e('email') && $activate_email &&
|
||
$message->has_email_content($message->type))
|
||
Message_Model::has_email_content($message->type))
|
||
{
|
||
try
|
||
{
|
||
... | ... | |
}
|
||
// activate SMS notification
|
||
if (module::e('sms') && $activate_sms &&
|
||
$message->has_sms_content($message->type))
|
||
Message_Model::has_sms_content($message->type))
|
||
{
|
||
try
|
||
{
|
freenetis/trunk/application/controllers/settings.php | ||
---|---|---|
try
|
||
{
|
||
// creates helper functions
|
||
$voip_sip->create_functions();
|
||
Voip_sip_Model::create_functions();
|
||
// create views
|
||
$voip_sip->create_views();
|
||
Voip_sip_Model::create_views();
|
||
}
|
||
catch (Exception $e)
|
||
{
|
freenetis/trunk/application/models/iface.php | ||
---|---|---|
* @param integer $type
|
||
* @return string
|
||
*/
|
||
public function get_type($type = NULL)
|
||
public static function get_type($type)
|
||
{
|
||
if (empty($type) && isset($this) && $this->id)
|
||
{
|
||
$type = $this->type;
|
||
}
|
||
|
||
if (is_numeric($type) && array_key_exists($type, self::$types))
|
||
{
|
||
return __(self::$types[$type]);
|
||
... | ... | |
* @param integer $type
|
||
* @return string
|
||
*/
|
||
public function get_default_name($type = NULL)
|
||
public static function get_default_name($type)
|
||
{
|
||
if (empty($type) && isset($this) && $this->id)
|
||
{
|
||
$type = $this->type;
|
||
}
|
||
|
||
if (!empty($type) && array_key_exists($type, self::$default_names))
|
||
{
|
||
return self::$default_names[$type];
|
||
... | ... | |
* @param integer $mode
|
||
* @return string
|
||
*/
|
||
public function get_wireless_mode($mode = NULL)
|
||
public static function get_wireless_mode($mode = NULL)
|
||
{
|
||
if (!$mode && isset($this) && get_class($this) == __CLASS__ && $this->id)
|
||
{
|
||
$mode = $this->wireless_mode;
|
||
}
|
||
|
||
if (array_key_exists($mode, self::$wireless_modes))
|
||
{
|
||
return __(self::$wireless_modes[$mode]);
|
||
... | ... | |
* Returns antenna of current wireless interface
|
||
*
|
||
* @author Michal Kliment
|
||
* @param integer $mode
|
||
* @param integer $antenna
|
||
* @return string
|
||
*/
|
||
public function get_wireless_antenna($antenna = NULL)
|
||
public static function get_wireless_antenna($antenna)
|
||
{
|
||
if ($antenna === NULL)
|
||
{
|
||
$antenna = $this->wireless_antenna;
|
||
}
|
||
|
||
if (array_key_exists($antenna, self::$wireless_antennas))
|
||
{
|
||
return __(self::$wireless_antennas[$antenna]);
|
freenetis/trunk/application/models/job_report.php | ||
---|---|---|
* @param integer $type
|
||
* @return string
|
||
*/
|
||
public function get_name_of_payment_type($type = NULL)
|
||
public static function get_name_of_payment_type($type)
|
||
{
|
||
if ($type === NULL && $this->id)
|
||
{
|
||
$type = $this->payment_type;
|
||
}
|
||
|
||
if (array_key_exists($type, self::$PAYMENT_TYPES))
|
||
{
|
||
return __(self::$PAYMENT_TYPES[$type]);
|
freenetis/trunk/application/models/link.php | ||
---|---|---|
* @param integer $norm
|
||
* @return string
|
||
*/
|
||
public function get_wireless_norm ($norm = NULL)
|
||
public static function get_wireless_norm ($norm)
|
||
{
|
||
if (!$norm && isset($this))
|
||
{
|
||
$norm = $this->wireless_norm;
|
||
}
|
||
|
||
if (array_key_exists($norm, self::$wireless_norms))
|
||
{
|
||
return self::$wireless_norms[$norm];
|
||
... | ... | |
* @param integer $polarization
|
||
* @return string
|
||
*/
|
||
public function get_wireless_polarization ($polarization = NULL)
|
||
public static function get_wireless_polarization ($polarization)
|
||
{
|
||
if (!$polarization)
|
||
{
|
||
$polarization = $this->wireless_polarization;
|
||
}
|
||
|
||
if (array_key_exists($polarization, self::$wireless_polarizations))
|
||
{
|
||
return __(self::$wireless_polarizations[$polarization]);
|
||
... | ... | |
* @param integer $norm
|
||
* @return integer
|
||
*/
|
||
public function get_wireless_max_bitrate($norm = NULL)
|
||
public static function get_wireless_max_bitrate($norm = NULL)
|
||
{
|
||
if (!$norm)
|
||
{
|
||
$norm = $this->wireless_norm;
|
||
}
|
||
|
||
if (array_key_exists($norm, self::$wireless_max_bitrates))
|
||
{
|
||
return self::$wireless_max_bitrates[$norm];
|
||
... | ... | |
* @param integer $iface_type
|
||
* @return integer
|
||
*/
|
||
public static function get_max_ifaces_count ($iface_type = NULL)
|
||
public static function get_max_ifaces_count ($iface_type)
|
||
{
|
||
if (!$iface_type)
|
||
{
|
||
return NULL;
|
||
}
|
||
|
||
if (array_key_exists($iface_type, self::$ifaces_count))
|
||
{
|
||
return self::$ifaces_count[$iface_type];
|
freenetis/trunk/application/models/member.php | ||
---|---|---|
*
|
||
* @return array[string]
|
||
*/
|
||
public static function select_list_grouped($optgroup = TRUE)
|
||
public function select_list_grouped($optgroup = TRUE)
|
||
{
|
||
$list = array();
|
||
|
freenetis/trunk/application/models/user.php | ||
---|---|---|
*
|
||
* @return array[string]
|
||
*/
|
||
public static function select_list_grouped($optgroup = TRUE)
|
||
public function select_list_grouped($optgroup = TRUE)
|
||
{
|
||
$list = array();
|
||
|
freenetis/trunk/application/views/device_templates/show.php | ||
---|---|---|
<?php foreach ($ivals[Iface_Model::TYPE_WIRELESS]['items'] as $item): ?>
|
||
<tr>
|
||
<td><?php echo $item['name'] ?></td>
|
||
<td><?php echo $iface_model->get_wireless_mode(@$item['wireless_mode']) ?></td>
|
||
<td><?php echo $iface_model->get_wireless_antenna(@$item['wireless_antenna']) ?></td>
|
||
<td><?php echo Iface_Model::get_wireless_mode(@$item['wireless_mode']) ?></td>
|
||
<td><?php echo Iface_Model::get_wireless_antenna(@$item['wireless_antenna']) ?></td>
|
||
</tr>
|
||
<?php endforeach; ?>
|
||
</table>
|
||
... | ... | |
<tr>
|
||
<td><?php echo $item['name'] ?></td>
|
||
<td><?php echo __('Port') ?> <?php echo $item['number'] ?></td>
|
||
<td><?php echo $iface_model->get_port_mode($item['port_mode']) ?></td>
|
||
<td><?php echo Iface_Model::get_port_mode($item['port_mode']) ?></td>
|
||
</tr>
|
||
<?php endforeach; ?>
|
||
</table>
|
freenetis/trunk/application/views/ifaces/show.php | ||
---|---|---|
</tr>
|
||
<tr>
|
||
<th><?php echo __('Type') ?></th>
|
||
<td><?php echo $iface->get_type() ?></td>
|
||
<td><?php echo Iface_Model::get_type($iface->type) ?></td>
|
||
</tr>
|
||
<?php if (isset($iface->number)): ?>
|
||
<tr>
|
freenetis/trunk/application/views/links/show.php | ||
---|---|---|
<?php if ($link->wireless_norm != ''): ?>
|
||
<tr>
|
||
<th><?php echo __('Norm') ?></th>
|
||
<td><?php echo $link->get_wireless_norm() ?></td>
|
||
<td><?php echo Link_Model::get_wireless_norm($link->wireless_norm) ?></td>
|
||
</tr>
|
||
<?php endif ?>
|
||
<?php if ($link->wireless_channel != ''): ?>
|
||
... | ... | |
<?php if ($link->wireless_polarization != ''): ?>
|
||
<tr>
|
||
<th><?php echo __('Polarization') ?></th>
|
||
<td><?php echo $link->get_wireless_polarization() ?></td>
|
||
<td><?php echo Link_Model::get_wireless_polarization($link->wireless_polarization) ?></td>
|
||
</tr>
|
||
<?php endif ?>
|
||
</table>
|
freenetis/trunk/application/views/work_reports/show.php | ||
---|---|---|
</tr>
|
||
<tr>
|
||
<th><?php echo __('Payment type') ?></th>
|
||
<td><?php echo $work_report_model->get_name_of_payment_type() ?></td>
|
||
<td><?php echo Job_report_Model::get_name_of_payment_type($work_report_model->payment_type) ?></td>
|
||
</tr>
|
||
<tr>
|
||
<th><?php echo __('Date from') ?></th>
|
Také k dispozici: Unified diff
Opravy: refs #1001: Hybridni metody v PHP 5.6 (merge z 1.2)