Index: branches/5.1.x/units/manufacturers/manufacturers_config.php =================================================================== diff -u -r13465 -r13549 --- branches/5.1.x/units/manufacturers/manufacturers_config.php (.../manufacturers_config.php) (revision 13465) +++ branches/5.1.x/units/manufacturers/manufacturers_config.php (.../manufacturers_config.php) (revision 13549) @@ -1,6 +1,6 @@ 'manuf', - 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'), - 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), - 'EventHandlerClass' => Array('class'=>'ManufacturersEventHandler','file'=>'manufacturers_event_handler.php','build_event'=>'OnBuild'), - 'TagProcessorClass' => Array('class'=>'ManufacturersTagProcessor','file'=>'manufacturers_tag_processor.php','build_event'=>'OnBuild'), + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'ManufacturersEventHandler', 'file' => 'manufacturers_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'ManufacturersTagProcessor', 'file' => 'manufacturers_tag_processor.php', 'build_event' => 'OnBuild'), 'AutoLoad' => true, - 'QueryString' => Array( + 'QueryString' => Array ( 1 => 'id', 2 => 'Page', 3 => 'PerPage', 4 => 'event', 5 => 'mode', ), 'IDField' => 'ManufacturerId', - 'StatusField' => Array(), + 'StatusField' => Array (), 'TableName' => TABLE_PREFIX.'Manufacturers', - 'TitlePresets' => Array( - 'default' => Array( 'new_status_labels' => Array('manuf'=>'!la_title_AddingManufacturer!'), - 'edit_status_labels' => Array('manuf'=>'!la_title_EditingManufacturer!'), - 'new_titlefield' => Array('manuf'=>'!la_title_NewManufacturers!'), + 'TitlePresets' => Array ( + 'default' => Array ( 'new_status_labels' => Array ('manuf' => '!la_title_AddingManufacturer!'), + 'edit_status_labels' => Array ('manuf' => '!la_title_EditingManufacturer!'), + 'new_titlefield' => Array ('manuf' => '!la_title_NewManufacturers!'), ), - 'manuf_list'=>Array( 'prefixes' => Array('manuf_List'), + 'manuf_list' =>Array ( 'prefixes' => Array ('manuf_List'), 'format' => "!la_title_Manufacturers!", ), - 'manuf_edit'=>Array( 'prefixes' => Array('manuf'), - 'new_titlefield' => Array('manuf'=>'!la_title_NewManufacturer!'), + 'manuf_edit' =>Array ( 'prefixes' => Array ('manuf'), + 'new_titlefield' => Array ('manuf' => '!la_title_NewManufacturer!'), 'format' => "#manuf_status# '#manuf_titlefield#' - !la_title_General!", ), ), - 'PermSection' => Array('main' => 'in-commerce:manufacturers'), + 'PermSection' => Array ('main' => 'in-commerce:manufacturers'), - 'Sections' => Array( - 'in-commerce:manufacturers' => Array( + 'Sections' => Array ( + 'in-commerce:manufacturers' => Array ( 'parent' => 'in-commerce', 'icon' => 'manufacturers', 'label' => 'la_tab_Manufacturers', - 'url' => Array('t' => 'in-commerce/manufacturers/manufacturers_list', 'pass' => 'm'), - 'permissions' => Array('view', 'add', 'edit', 'delete'), + 'url' => Array ('t' => 'in-commerce/manufacturers/manufacturers_list', 'pass' => 'm'), + 'permissions' => Array ('view', 'add', 'edit', 'delete'), 'priority' => 4, 'type' => stTREE, ), @@ -66,20 +66,20 @@ 'TitleField' => 'Name', // field, used in bluebar when editing existing item - 'ListSQLs' => Array( ''=>'SELECT * FROM %s', + 'ListSQLs' => Array ( '' => 'SELECT * FROM %s', ), // key - special, value - list select sql - 'ItemSQLs' => Array(''=>'SELECT * FROM %s', + 'ItemSQLs' => Array ('' => 'SELECT * FROM %s', ), - 'ListSortings' => Array( - '' => Array( - 'Sorting' => Array('Name' => 'asc'), + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('Name' => 'asc'), ) ), 'Fields' => Array ( - 'ManufacturerId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,), - 'Name' => Array('type' => 'string','not_null' => '1','default' => '', 'required'=>true,'max_len'=>255), - 'Description' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL), - 'URL' => Array('type' => 'string','not_null' => '1','default' => '','max_len'=>255), + 'ManufacturerId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), + 'Name' => Array ('type' => 'string', 'not_null' => '1', 'default' => '', 'required' =>true, 'max_len' =>255), + 'Description' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL), + 'URL' => Array ('type' => 'string', 'not_null' => '1', 'default' => '', 'max_len' =>255), 'Logo' => Array ( 'type' => 'string', 'formatter' => 'kPictureFormatter', @@ -88,21 +88,22 @@ 'multiple' => false, 'max_len' => 255, 'not_null' => 1, 'default' => '' ), - 'IsPopular' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'Email' => Array('type' => 'string', 'formatter'=>'kFormatter', 'regexp'=>'/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', 'sample_value' => 'email@domain.com', 'default' => null, 'error_msgs' => Array('invalid_format'=>'!la_invalid_email!') ), - 'Phone' => Array('type' => 'string','default' => null), - 'Fax' => Array('type' => 'string', 'default' => null), - 'Address1' => Array('type' => 'string','default' => null), - 'Address2' => Array('type' => 'string', 'default' => null), - 'City' => Array('type' => 'string','default' => null), - 'State' => Array( + 'IsPopular' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0, + ), + 'Email' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', 'sample_value' => 'email@domain.com', 'default' => null, 'error_msgs' => Array ('invalid_format' => '!la_invalid_email!') ), + 'Phone' => Array ('type' => 'string', 'default' => null), + 'Fax' => Array ('type' => 'string', 'default' => null), + 'Address1' => Array ('type' => 'string', 'default' => null), + 'Address2' => Array ('type' => 'string', 'default' => null), + 'City' => Array ('type' => 'string', 'default' => null), + 'State' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'option_key_field' => 'DestAbbr', 'option_title_field' => 'Translation', 'default' => null), + 'Zip' => Array ('type' => 'string', 'default' => null), + 'Country' => Array ( 'type' => 'string', - 'formatter' => 'kOptionsFormatter', 'options' => Array(), - 'default' => null - ), - 'Zip' => Array('type' => 'string', 'default' => null), - 'Country' => Array( - 'type' => 'string', 'formatter' => 'kOptionsFormatter', 'options_sql' => ' SELECT IF(l%2$s_Name = "", l%3$s_Name, l%2$s_Name) AS Name, IsoCode FROM '.TABLE_PREFIX.'CountryStates