Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 1723

Přidáno uživatelem Ondřej Fibich před asi 12 roky(ů)

Vydani:

- freenetis 1.0.3

Opravy:

- #363: Logy akci partition pro aktualni den
- #355: CRON ostraneni hlaseni wgetu
- #358: suhosin.post.max_vars
- #362: Optimalizace seznamu zarizeni
- #361: Chybejici moznost popup pridani VLANu u pridavani VLAN rozhrani

Zobrazit rozdíly:

freenetis/branches/testing/application/vendors/deb/freenetis/postinst
a2enmod ssl > /dev/null
fi
# PHP settings
php_settings="
# PHP settings
php_flag register_globals Off
php_flag magic_quotes_gpc Off
php_flag magic_quotes_runtime Off
php_flag file_uploads On
php_flag short_open_tag On
# large inputs (fixes #358)
php_admin_value suhosin.post.max_vars 100000"
# make config for FN
if [ "$SERVER_TYPE" = localhost ]; then
......
echo " AllowOverride All" >> $A2CF
echo " Order allow,deny" >> $A2CF
echo " allow from all" >> $A2CF
echo " ${php_settings}" >> $A2CF
echo "</Directory>" >> $A2CF
else
......
echo " AllowOverride All" >> $A2CF
echo " Order allow,deny" >> $A2CF
echo " allow from all" >> $A2CF
echo " ${php_settings}" >> $A2CF
echo " </Directory>" >> $A2CF
echo " ErrorLog $ERROR_LOG_FILE" >> $A2CF
echo " CustomLog $CUSTOM_LOG_FILE common" >> $A2CF
......
echo "" >> /etc/cron.d/freenetis
echo "SHELL=/bin/sh" >> /etc/cron.d/freenetis
echo "PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" >> /etc/cron.d/freenetis
echo "* * * * * root wget -O /dev/null ${PROTOCOL}://${SERVERNAME}/index.php/cs/scheduler/run --no-check-certificate" >> /etc/cron.d/freenetis
echo "* * * * * root wget -O /dev/null ${PROTOCOL}://${SERVERNAME}/index.php/cs/scheduler/run --no-check-certificate -q" >> /etc/cron.d/freenetis
if [ -x /usr/sbin/invoke-rc.d ]; then
invoke-rc.d cron restart 3>/dev/null || true
freenetis/branches/testing/application/models/device.php
else
$limit = "";
// HACK FOR IMPROVING PERFORMANCE (fixes #362)
$select_cloud = '';
$join_cloud = '';
if (strpos($params['filter_sql'], '.`cloud` LIKE '))
{
$select_cloud = ', c.id AS cloud';
$join_cloud = "
LEFT JOIN ifaces i ON i.device_id = d.id
LEFT JOIN ip_addresses ip ON ip.iface_id = i.id
LEFT JOIN clouds_subnets cs ON cs.subnet_id = ip.subnet_id
LEFT JOIN clouds c ON cs.cloud_id = c.id";
}
// query
return $this->db->query("
SELECT * FROM
......
u.name AS user_name, u.surname AS user_surname, u.login AS user_login,
d.login, d.password, d.price, d.trade_name, d.payment_rate,
d.buy_date, m.name AS member_name, s.street, t.town,
ap.street_number, d.comment, c.id AS cloud
ap.street_number, d.comment $select_cloud
FROM devices d
JOIN users u ON d.user_id = u.id
JOIN members m ON u.member_id = m.id
......
LEFT JOIN towns t ON ap.town_id = t.id
LEFT JOIN enum_types e ON d.type = e.id
LEFT JOIN translations f ON lang = ? AND e.value = f.original_term
LEFT JOIN ifaces i ON i.device_id = d.id
LEFT JOIN ip_addresses ip ON ip.iface_id = i.id
LEFT JOIN clouds_subnets cs ON cs.subnet_id = ip.subnet_id
LEFT JOIN clouds c ON cs.cloud_id = c.id
$join_cloud
) d
$where
GROUP BY device_id
......
if ($filter_sql != '')
$where = "WHERE $filter_sql";
// HACK FOR IMPROVING PERFORMANCE (fixes #362)
$select_cloud = '';
$join_cloud = '';
if (strpos($filter_sql, '.`cloud` LIKE '))
{
$select_cloud = ', c.id AS cloud';
$join_cloud = "
LEFT JOIN ifaces i ON i.device_id = d.id
LEFT JOIN ip_addresses ip ON ip.iface_id = i.id
LEFT JOIN clouds_subnets cs ON cs.subnet_id = ip.subnet_id
LEFT JOIN clouds c ON cs.cloud_id = c.id";
}
// query
return $this->db->query("
SELECT COUNT(device_id) AS total FROM
......
u.surname AS user_surname, u.login AS user_login,
d.login, d.password, d.price, d.trade_name, d.payment_rate,
d.buy_date, m.name AS member_name, s.street, t.town,
ap.street_number, d.comment, c.id AS cloud
ap.street_number, d.comment $select_cloud
FROM devices d
JOIN users u ON d.user_id = u.id
JOIN members m ON u.member_id = m.id
......
LEFT JOIN towns t ON ap.town_id = t.id
LEFT JOIN enum_types e ON d.type = e.id
LEFT JOIN translations f ON lang = ? AND e.value = f.original_term
LEFT JOIN ifaces i ON i.device_id = d.id
LEFT JOIN ip_addresses ip ON ip.iface_id = i.id
LEFT JOIN clouds_subnets cs ON cs.subnet_id = ip.subnet_id
LEFT JOIN clouds c ON cs.cloud_id = c.id
$join_cloud
) d
$where
GROUP BY device_id
freenetis/branches/testing/application/controllers/ifaces.php
->label('VLAN')
->options($vlan_ifaces)
->rules('required')
->add_button('vlans')
->style('width:200px');
$vlan_form->dropdown('parent_iface_id')
......
->label('VLAN')
->options($vlans)
->selected($vlan_id)
->add_button('vlans')
->style('width:200px');
$vlan_form->dropdown('parent_iface_id')
freenetis/branches/testing/application/controllers/settings.php
{
try
{
// create table
Log_Model::create_table();
// create partition fo today (fixes #363)
try
{
ORM::factory('log')->add_partition();
}
catch (Exception $ignore)
{ // ignore errors (partition already exists)
}
}
catch (Exception $e)
{

Také k dispozici: Unified diff