Skip to content

Commit

Permalink
Fix: works on repair broken features
Browse files Browse the repository at this point in the history
  • Loading branch information
hregis committed Aug 11, 2011
1 parent bb98f79 commit 45931c9
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 19 deletions.
5 changes: 3 additions & 2 deletions htdocs/commande/class/commande.class.php
Expand Up @@ -24,7 +24,7 @@
* \file htdocs/commande/class/commande.class.php
* \ingroup commande
* \brief Fichier des classes de commandes
* \version $Id: commande.class.php,v 1.123 2011/08/10 22:47:33 eldy Exp $
* \version $Id: commande.class.php,v 1.124 2011/08/11 07:41:41 hregis Exp $
*/
require_once(DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php");
require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php");
Expand Down Expand Up @@ -899,7 +899,7 @@ function createFromProposal($object,$invertdetail=0,$hookmanager=false)
$this->cond_reglement_id = $object->cond_reglement_id;
$this->mode_reglement_id = $object->mode_reglement_id;
$this->availability_id = $object->availability_id;
$this->demand_reason_id = $object->demand_reason_id;
$this->demand_reason_id = $object->demand_reason_id;
$this->date_livraison = $object->date_livraison;
$this->fk_delivery_address = $object->fk_delivery_address;
$this->contact_id = $object->contactid;
Expand All @@ -917,6 +917,7 @@ function createFromProposal($object,$invertdetail=0,$hookmanager=false)
// Hook of thirdparty module
if (is_object($hookmanager))
{
$parameters=array('objFrom'=>$object);
$reshook=$hookmanager->executeHooks('createfrom',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) $error++;
}
Expand Down
4 changes: 2 additions & 2 deletions htdocs/core/class/html.formfile.class.php
Expand Up @@ -21,7 +21,7 @@
* \file htdocs/core/class/html.formfile.class.php
* \ingroup core
* \brief File of class to offer components to list and upload files
* \version $Id: html.formfile.class.php,v 1.54 2011/08/10 22:47:34 eldy Exp $
* \version $Id: html.formfile.class.php,v 1.55 2011/08/11 07:41:41 hregis Exp $
*/


Expand Down Expand Up @@ -451,7 +451,7 @@ function showdocuments($modulepart,$filename,$filedir,$urlsource,$genallowed,$de
$out.= '</tr>';

// Execute hooks
$parameters=array('socid'=>$GLOBALS['socid'],'id'=>$GLOBAL['id']);
$parameters=array('socid'=>$GLOBALS['socid'],'id'=>$GLOBALS['id']);
if (is_object($hookmanager)) $out.= $hookmanager->executeHooks('formBuilddocOptions',$parameters);
}

Expand Down
4 changes: 2 additions & 2 deletions htdocs/core/tpl/predefinedproductline_create.tpl.php
Expand Up @@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* $Id: predefinedproductline_create.tpl.php,v 1.16 2011/08/10 22:47:33 eldy Exp $
* $Id: predefinedproductline_create.tpl.php,v 1.17 2011/08/11 07:41:41 hregis Exp $
*
* Need to have following variables defined:
* $conf
Expand Down Expand Up @@ -61,7 +61,7 @@

if (is_object($hookmanager))
{
$parameters=array();
$parameters=array('fk_parent_line'=>$_POST["fk_parent_line"]);
$hookmanager->executeHooks('formCreateProductOptions',$parameters,$object,$action);
}

Expand Down
28 changes: 15 additions & 13 deletions htdocs/core/tpl/predefinedproductline_edit.tpl.php
Expand Up @@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* $Id: predefinedproductline_edit.tpl.php,v 1.18 2011/08/11 01:36:53 eldy Exp $
* $Id: predefinedproductline_edit.tpl.php,v 1.19 2011/08/11 07:41:41 hregis Exp $
*
* Need to have following variables defined:
* $conf
Expand Down Expand Up @@ -49,16 +49,18 @@

if (is_object($hookmanager))
{
$parameters=array('fk_parent_line'=>$line_fk_parent_line);
$fk_parent_line = ($_POST["fk_parent_line"] ? $_POST["fk_parent_line"] : $line->fk_parent_line);
$parameters=array('fk_parent_line'=>$fk_parent_line);
$hookmanager->executeHooks('formEditProductOptions',$parameters,$object,$action);

// editeur wysiwyg
$nbrows=ROWS_2;
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
$doleditor=new DolEditor('desc',$line->description,'',164,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70);
$doleditor->Create();
?></td>
}

// editeur wysiwyg
$nbrows=ROWS_2;
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
$doleditor=new DolEditor('desc',$line->description,'',164,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70);
$doleditor->Create();
?></td>

<td align="right"><?php echo $html->load_tva('tva_tx',$line->tva_tx,$seller,$buyer,'',$line->info_bits); ?></td>

Expand All @@ -82,7 +84,7 @@ class="button" name="save"
value="<?php echo $langs->trans("Cancel"); ?>"></td>
</tr>

<?php if ($conf->service->enabled && $dateSelector && $line->product_type == 1) { ?>
<?php if ($conf->service->enabled && $dateSelector && $line->product_type == 1) { ?>
<tr <?php echo $bc[$var]; ?>>
<td colspan="9"><?php echo $langs->trans('ServiceLimitedDuration').' '.$langs->trans('From').' '; ?>
<?php
Expand All @@ -91,5 +93,5 @@ class="button" name="save"
echo $html->select_date($line->date_end,'date_end',$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$line->date_end?0:1,"updateligne");
?></td>
</tr>
<?php } ?></form>
<!-- END PHP TEMPLATE predefinedproductline_edit.tpl.php -->
<?php } ?></form>
<!-- END PHP TEMPLATE predefinedproductline_edit.tpl.php -->

0 comments on commit 45931c9

Please sign in to comment.