diff --git a/lib/Alchemy/Phrasea/Core/Version.php b/lib/Alchemy/Phrasea/Core/Version.php index 96936b449a..ee6054ca28 100644 --- a/lib/Alchemy/Phrasea/Core/Version.php +++ b/lib/Alchemy/Phrasea/Core/Version.php @@ -18,7 +18,7 @@ namespace Alchemy\Phrasea\Core; */ class Version { - protected static $number = '3.8.1-alpha.3'; + protected static $number = '3.8.1-alpha.4'; protected static $name = 'Diplodocus'; public static function getNumber() diff --git a/lib/classes/User/Adapter.php b/lib/classes/User/Adapter.php index 98b464bfc2..7e28331559 100644 --- a/lib/classes/User/Adapter.php +++ b/lib/classes/User/Adapter.php @@ -74,9 +74,9 @@ class User_Adapter implements User_Interface, cache_cacheableInterface 'images_per_page' => 20, 'images_size' => 120, 'editing_images_size' => 134, - 'editing_top_box' => '180px', - 'editing_right_box' => '400px', - 'editing_left_box' => '710px', + 'editing_top_box' => 30, + 'editing_right_box' => 48, + 'editing_left_box' => 33, 'basket_sort_field' => 'name', 'basket_sort_order' => 'ASC', 'warning_on_delete_story' => 'true', diff --git a/lib/classes/patch/381alpha4a.php b/lib/classes/patch/381alpha4a.php new file mode 100644 index 0000000000..645cb049d3 --- /dev/null +++ b/lib/classes/patch/381alpha4a.php @@ -0,0 +1,79 @@ +release; + } + + /** + * {@inheritdoc} + */ + public function require_all_upgrades() + { + return false; + } + + /** + * {@inheritdoc} + */ + public function concern() + { + return $this->concern; + } + + /** + * {@inheritdoc} + */ + public function apply(base $appbox, Application $app) + { + $sql = "SELECT usr_id, prop, value FROM usr_settings + WHERE prop = 'editing_top_box' + OR prop = 'editing_right_box' OR prop = 'editing_left_box'"; + + $stmt = $appbox->get_connection()->prepare($sql); + $stmt->execute(); + $rows = $stmt->fetchAll(\PDO::FETCH_ASSOC); + $stmt->closeCursor(); + + $sql = 'UPDATE usr_settings SET value = :value WHERE usr_id = :usr_id AND prop = :prop'; + $stmt = $appbox->get_connection()->prepare($sql); + + foreach ($rows as $row) { + $value = $row['value']; + + if ('px' === substr($value, -2)) { + $value = substr($value, 0, -2); + } elseif ('%' === substr($value, -1)) { + $value = substr($value, 0, -1); + } + + $stmt->execute(array(':value' => $value, ':usr_id' => $row['usr_id'], ':prop' => $row['prop'])); + } + + $stmt->closeCursor(); + + return true; + } +} diff --git a/templates/web/prod/actions/edit_default.html.twig b/templates/web/prod/actions/edit_default.html.twig index c63eba2384..6eb2b714ba 100644 --- a/templates/web/prod/actions/edit_default.html.twig +++ b/templates/web/prod/actions/edit_default.html.twig @@ -127,7 +127,7 @@ -