Permalink
Browse files

Merge branch 'master' of github.com:flack/openpsa

  • Loading branch information...
flack committed Jul 10, 2018
2 parents 073a8b4 + 1e03878 commit de87807241f4a7b03a1bdba8f232aece96be0ba4
View
@@ -21,8 +21,8 @@
"php": "^5.5.35 || ^5.6.21 || >7.0.4",
"ext-mbstring": "*",
"ext-iconv": "*",
"checkdomain/holiday": "^2.0.0",
"doctrine/cache": "^1.5.4",
"checkdomain/holiday": "^3.0.0",
"doctrine/cache": "^1.6.0",
"ezyang/htmlpurifier": "^4.7",
"gregwar/captcha": "^1.0",
"guzzlehttp/guzzle": "^6.3",
@@ -36,7 +36,7 @@
"paragonie/random_compat": "^2.0",
"phpspec/php-diff": "^1.0.2",
"sabre/vobject" : "^3.5.3",
"simplepie/simplepie": "1.3.*",
"simplepie/simplepie": "^1.5",
"studio-42/elfinder": ">= 2.1.31",
"swiftmailer/swiftmailer": "^5.2.0",
"symfony/config": "~2.5 | ~3.4",
@@ -127,7 +127,7 @@ public function save_callback()
private function _update_topic($prefix, $old_name)
{
if ($this->_controller->get_form_values()['style'] == '__create') {
if (isset($this->_controller->get_form_values()['style']) && $this->_controller->get_form_values()['style'] == '__create') {
$this->edit_topic->style = $this->_create_style($this->edit_topic->name);
// Failed to create the new style template
@@ -13,6 +13,7 @@
'org_openpsa_calendar_event_dba' => 'org_openpsa_event',
'midgard_person' => 'org_openpsa_person',
'midgard_group' => 'org_openpsa_organization',
'org_openpsa_salesproject' => 'org_openpsa_project',
),
/**
* Define the property to use as 'URL-name' per class, use false for skipping heuristics and not using any property as url-name
@@ -600,7 +600,7 @@ public static function resolve_baseclass($classname)
$parent_class = $classname;
}
$cached[$classname] = $parent_class;
$cached[$classname] = self::class_rewrite($parent_class);
return $cached[$classname];
}
@@ -249,7 +249,7 @@ private function _get_link_fields($schema_type, $for_object)
if (empty($info['target'])) {
$info['target'] = 'guid';
}
} elseif ($linked_class != $object_baseclass) {
} elseif (!self::is_same_class($linked_class, $object_baseclass)) {
// This link points elsewhere
continue;
}
@@ -413,6 +413,7 @@ private function _resolve_child_classes()
&& !$this->_resolve_child_classes_links_back($up_property, $schema_type, $this->mgdschema_class)) {
continue;
}
$child_classes[] = $schema_type;
}
@@ -92,6 +92,7 @@ public function get_component_for_class($classname)
'org.openpsa.role' => 'org.openpsa.contacts',
'org.openpsa.member' => 'org.openpsa.contacts',
'org.openpsa.salesproject' => 'org.openpsa.sales',
'org.openpsa.offer' => 'org.openpsa.sales',
'org.openpsa.event' => 'org.openpsa.calendar',
'org.openpsa.eventmember' => 'org.openpsa.calendar',
'org.openpsa.invoice' => 'org.openpsa.invoices',
@@ -415,6 +415,7 @@ public static function parse_item_author(net_nemein_rss_parser_item $item)
}
if (isset($author_info['user_or_full'])) {
$author_info['user_or_full'] = trim($author_info['user_or_full']);
if (strstr($author_info['user_or_full'], ' ')) {
// This value has a space in it, assuming full name
$author_info['full_name'] = $author_info['user_or_full'];
@@ -83,7 +83,8 @@ public function get_link($key = 0, $rel = 'alternate')
*/
public function get_id($hash = false)
{
$guid = parent::get_id($hash);
$guid = parent::get_id($hash, false);
if (empty($guid)) {
$this->_id_missing = true;
$guid = parent::get_link();
@@ -45,7 +45,7 @@ private function add_holidays($from, $to)
$from = new DateTime(strftime('%Y-%m-%d', $from));
$to = new DateTime(strftime('%Y-%m-%d', $to));
$country = $this->_config->get('holidays_country');
if (class_exists('\\Checkdomain\\Holiday\\Provider\\' . $country)) {
if (class_exists('\\Checkdomain\\Holiday\\Provider\\' . strtoupper($country))) {
$util = new \Checkdomain\Holiday\Util;
$region = $this->_config->get('holidays_region');
@@ -61,10 +61,8 @@ private function prepare_offer()
$offer = new org_openpsa_sales_salesproject_offer_dba;
$offer->designation = '';
$offer->introduction = $this->_l10n->get('offer intro');
$offer->offer_number = $this->salesproject->code;
$offer->salesproject = $this->salesproject->id;
$offer->notice = $billingdata->remarks;
$offer->create();
return $offer;
}
@@ -92,6 +90,8 @@ public function _handler_delete($handler_id, array $args, array &$data)
public function _handler_edit($handler_id, array $args, array &$data)
{
$this->offer = new org_openpsa_sales_salesproject_offer_dba($args[0]);
$this->salesproject = $this->offer->get_parent();
$this->salesproject->require_do('midgard:update');
return $this->run_form();
}
@@ -108,7 +108,7 @@ private function run_form()
$response = $wf->run();
if ($wf->get_state() == 'save') {
try {
$output_filename = $this->_l10n->get('offer_filename_prefix') . '-' . $this->offer->offer_number . '.pdf';
$output_filename = $this->_l10n->get('offer_filename_prefix') . '-' . $this->salesproject->code . '.pdf';
$this->client->render($output_filename);
midcom::get()->uimessages->add($this->_l10n->get('pdf created'), $this->_l10n->get('please verify the file'));
}
@@ -167,9 +167,6 @@ private function _list_deliverables()
$qb->add_constraint('salesproject', '=', $this->_salesproject->id);
$qb->add_constraint('up', '=', 0);
if ($this->_salesproject->state != org_openpsa_sales_salesproject_dba::STATE_LOST) {
$qb->add_constraint('state', '<>', org_openpsa_sales_salesproject_deliverable_dba::STATE_DECLINED);
}
$qb->add_order('state');
$qb->add_order('metadata.score');
$this->_request_data['deliverables_objects'] = [];
@@ -62,6 +62,10 @@ div.salesproject div.deliverables ol.deliverable_list .ui-sortable li.deliverabl
{
cursor: move;
}
div.salesproject div.deliverables ol.deliverable_list li.state-300
{
opacity: .5
}
div.salesproject div.deliverables ol.deliverable_list li.deliverable h3
{
@@ -289,7 +289,8 @@ public function providerIs_same_class()
{
return [
1 => ['org_openpsa_calendar_event_dba', 'org_openpsa_event', true],
3 => ['midgard_snippet', 'org_openpsa_invoices_billing_data_dba', false],
2 => ['midgard_snippet', 'org_openpsa_invoices_billing_data_dba', false],
3 => ['org_openpsa_salesproject', 'org_openpsa_project', true],
];
}
@@ -307,6 +308,7 @@ public function providerResolve_baseclass()
1 => ['org_openpsa_calendar_event_dba', 'org_openpsa_event'],
2 => ['org_openpsa_calendar_event_member_dba', 'org_openpsa_eventmember'],
3 => ['org_openpsa_contacts_person_dba', 'org_openpsa_person'],
4 => ['org_openpsa_sales_salesproject_dba', 'org_openpsa_project'],
];
}

0 comments on commit de87807

Please sign in to comment.