plugins/mf_countryData/forms/countriesFilter.php 4

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
22 important declaration, do not remove (would cause bug)
28 columns descriptions, including autogenerated form settings
74 'tab_main'=>array('htmlTableOpen_filter', 'MotClef_filter', 'htmlTableHalf_filter','Deleted_filter', 'htmlTableClose_filter' )

plugins/mf_authentification/index.php 2

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
59 load default module

install/update_scripts/1.9/history.php 7

Type Line Description
9 www.apache.org/licenses/LICENSE-2.0
37 adding new history fields
51 deleting old change_log field (which has never been in use !)
96 save current locale
99 alter table for each locale
101 switch the locale
107 restore current locale

plugins/mf_countryData/languages/mfCountryDataPlugin_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

plugins/siteInfos/templates/siteInfo-template.php 4

Type Line Description
9 www.apache.org/licenses/LICENSE-2.0
18 templates definition
21 A template with name 'default' is mandatory
22 newly created pages will use this template by default

plugins/mf_users/modules/userGroups.php 18

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
24 require_once DOC_ROOT.SUB_DIR.'/mf/plugins/mf_users/forms/usersForm.php';
32 breadcrumb
49 $currentPageUid = $mf->info['currentPageUid'];
60 add the plugin to the backend menus
68 breadcrumb
69 $l10n->getLabel('backend','administration');
85 case edit requested by some module as a GET url parameter
89 case we just re-edit the last saved record
129 breadcrumb
159 only admin users can create userGroups in this module
160 if($mf->currentUser->data['user_group']['value'] > ADMINISTRATEUR)
164 default date conditions
165 if($dateConditions=='')$dateConditions = ' AND DateAffichage <= CURDATE()'; //AND DateFin >= CURDATE()
208 remove useless keys
237 setup AJAX output
239 disable fields editing
243 create and publish the record form

plugins/mf_users/languages/records/mfUserGroup_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

plugins/contacts/index.php 4

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
64 load the translation files
68 include custom contact class or base contact class by default
74 "Datas" MENU

plugins/mf_users/languages/forms/usersForm_l10n.php 2

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
21 TODO: FICHIER VITE COPIE, FILTRER LES VALEURS INUTILES

plugins/mf_countryData/records/mfDepartement.php 3

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
21 table name in the SQL database
104 optimisation, on n'effectue la requête SQL que si elle n'a jamais été faite.

plugins/mf_searchEngine/languages/modules/webSearch_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

plugins/rid/records/rid.php 9

Type Line Description
9 www.apache.org/licenses/LICENSE-2.0
37 before 1 minute delay, outputs "value=test"
38 after 1 minute delay, outputs "value="
45 before 1 minute delay, outputs "value=test2"
51 table name in the SQL database
171 clean up session
184 clean up db
195 clean up session
198 clean up db

core/interfaces/module.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

plugins/mf_countryData/languages/records/mfColissimoFees_l10n.php 2

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
41 'no_record' => 'Aucun résultat.',

plugins/mf_users/languages/modules/userGroups_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

core/ExceptionThrower.php 3

Type Line Description
8 www.gnu.org/licenses/lgpl.html LGPL
31 php 5.2 and earlier don't support E_DEPRECATED
61 ignore supressed errors

backend/backend.php 38

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
37 initializes the CMS objects first so they can be exploited by all data processing functions
39 speed measurement stat
45 the $mf object holds the data and provides the standard cms function set to all modules, plugins and services
50 store a reference to this object the $mf object for further reference from all backend modules
53 log the backend initialization
63 process all the functions that have to be executed for the data / page processing
71 load the templates
75 MindFlow Backend
86 $mf->formsManager->initFormCssAndJS();
88 create default cli user with all rights by default
95 then prepare backend data if the user is identified
97 performance tuning : no $mf->formsManager->prepareData() in cli mode (because there should be no HTML, JS or CSS to display)
101 WEB_MODE : there is no $_SESSION in cli mode
102 reload current user in case his profile has been modified during a backend operation (user profile self editing)
105 then prepare backend data if the user is identified
111 if no user is identified, prepare identification
119 executes the render() function of every object and outputs the page
125 user logged in
127 process page header
131 display admin template
134 rendering backend plugins
154 process page footer
159 user not identified, display authentification
161 process page header
165 display login template
168 rendering backend plugins
172 process page footer
176 processing UI messages
210 $bodyParams : attributes to be added to the page bodytag
228 adding custom CSS
236 adding custom JS for the top of the page
257 adding custom JS for the bottom of the page
268 clean up all ressources and free memory after MindFlow execution
279 use first module as the default module
282 loading system modules (all modules are plugins)
286 validate the requested module is available in our modules list
303 show the language selector if there are more than 1 language available

core/records/dbRecord.php 305

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
29 name of the SQL table
30 static $oneTablePerLocale = false; //if set to true, mindflow will create and manage one table per locale. Each table will feature a suffix for the locale, such as _fr, _en or _de
31 static $createTableSQL; //SQL for the inherited class
32 static $createTableKeysSQL; //SQL keys for the inherited class
33 static $enableImportInitializationData = 0; //Enables initializing the table with data imported from function importInitializationData()
35 fields that have no value and should not be inserted in the database (usually page layout fields)
37 Array of chunks of HTML code to be displayed after the object's forms
39 class data
40 this array stores the data of our object for quick manipulation before storing the object into the database
41 lists the fields from the data array to be shown in the edit form by default
43 Flags for disabling pre / post process functions
44 usefull when importing existing data, if you do not want these functions to be trigerred when creating records using dbRecord
56 flags for features
57 storing record history impacts performance, so it is disabled by default
58 forces re-evaluating and displaying the record's editing form throught AJAX feedback once the record is saved. Useful if some value affects the form aspect. Disabled by default for performance optimization.
60 SQL for the dbRecord class : all mindflow records must have these fields available
81 ALTER TABLE `vz_orders_CB_fr` ADD `history_last` TEXT NOT NULL DEFAULT '' AFTER `alt_language`, ADD `history_past` TEXT NOT NULL DEFAULT '' AFTER `history_last`;
83 SQL for the keys of the dbRecord class : all mindflow records must have these fields available
122 TODO:supprimer et remplacer par uid
179 single or multiple
202 'date'=>'depart::formatDateDepart',
275 static function importInitializationData(&$html=array()){}
338 if($pdo->exec($sql) !== false) { return 1; }
339 else return 0;
352 Temporary variable, used to store current query
354 Read in entire file
359 Loop through each line
362 Skip it if it's a comment
366 Add this line to the current segment
368 If it has a semicolon at the end, it's the end of the query
371 Perform the query
391 Reset temp variable to empty
417 load l10n text for inherited record types
419 make sure base class dbRecord l10n text is loaded for any record type
424 load the current record's translation files
430 merging base class dbRecord existing Labels
455 execute custom user code prior presenting the data
457 if($this->getClassName()=="circuit")debug_print_backtrace();
458 preparing request only once
467 fix creator class in creator recordSelect field
480 echo $l10n->getLabel('main','error').' '.$e->getCode().'<br />'.chr(10);
523 $dummyCheck = explode('-',$fieldType);
524 $isDummyField = ($dummyCheck[0] == 'dummy');
578 try to unserialize the value
581 if ok, use it
584 mf < 1.4 compatibility check
589 mf < 1.4 compatibility check
606 updating template field value with data glued with microtemplate definition
609 also glue microtemplates
623 updating microtemplate field value with data glued with microtemplate definition
624 $this->data[$key]['value'][$key2]['value'][$microIndex]['microtemplate_data'] = self::glueWithMicrotemplateInfo($microtemplateKey, $microDatastructure['microtemplate_data']);
638 TODO : Also Glue microtemplates at record LEVEL adapting the code above. This code needs testing...
644 updating microtemplate field value with data glued with microtemplate definition
645 $this->data[$key]['value'][$microIndex]['microtemplate_data'] = self::glueWithMicrotemplateInfo($microtemplateKey, $microDatastructure['microtemplate_data']);
647 print_r($this->data[$key]['value'][$microIndex]);
668 mf < 1.4 compatibility
675 try to unserialize the value
678 if ok, use it
681 else mf < 1.4, try to explode array
688 convert filename and include timestamp in it
696 upgrade the file data structure from a string to an array
705 rename the file
707 echo "rename(".DOC_ROOT.SUB_DIR.$filePath.$filename.", ".DOC_ROOT.SUB_DIR.$filePath.$fileNamePart.$fileExtPart.");";
724 echo "*** stripTemplateInfo ***";
725 print_r($templateData);
734 print_r($strippedTemplateData);
746 echo "*** stripTemplateInfo ***";
747 print_r($templateData);
766 if($itemKey == 'microtemplate')$strippedTemplateData[$key]['value']=$value;
771 print_r($strippedData);
789 echo $templateName.'<br/>';
790 if($templateName == 'Page d\'accueil v2')print_r($mf->templates[$templateName]['template_data']);die();
855 gist.github.com/wrey75/c631f6fe9c975354aec7
864 Check the similarities
869 2 arrays: just go further...
870 .. and explain it's an update!
873 If we have no change, simply ignore
876 don't forget
878 unset the value on the second array
879 for the "surplus"
882 Don't mind if arrays or not.
887 remove information
892 Now, check for new stuff in $arr2
893 Don't argue it's unnecessary (even I believe you)
895 OK, it is quite stupid my friend
914 $k is the key to change
915 $v contains 'old' and 'new'.
921 Update...!
925 Remove the entry
929 A new value (can be array by the way).
943 we do not want to have these keys processed in the diff()
944 history_last = full record as it was on last store() operation
945 history_past = stores the differences between each store() operation
963 set record language
968 preparing request only once
969 verifying the record exists in the database
977 and $this->data['uid']['value'] != ""
978 echo "UPDATE<br />";
981 adjust the modification date
986 execute custom user code prior recording
990 store record history
994 we do not want to have these keys processed in the diff()
995 history_last = full record as it was on last store() operation
996 history_past = stores the differences between each store() operation
998 if(is_array($this->data['history_last']['value'])) print_r(self::diff($this->data['history_last']['value'],$currentData));
1000 add current differences to history log. The index is a timestamp using microtime().
1004 var_dump($this->data['history_past']['value']);
1008 store the last version of the record in key 'history_last' for next record compare
1013 prepare SQL
1015 if no entry exists, UPDATE
1023 trim dummy records
1051 debug_print_backtrace();
1056 execute custom user code after recording
1069 if no entry exists, CREATE
1070 echo "CREATE<br />";
1072 set the creator UID
1075 set the creator class
1081 adjust the creation date
1084 modification date is the same as creation date
1087 echo "\n\$this->data['creation_date']['value']=".$this->data['creation_date']['value'];
1090 execute custom user code prior recording
1093 prepare SQL
1100 trim dummy records
1105 debug_print_backtrace();
1106 print_r($this->data);
1127 debug_print_backtrace();
1132 execute custom user code after recording
1173 if(isset($keyData['value']) ){
1181 specify uid only if already defined in record, else autoincrement
1183 echo "key=".$keyName." value=".$item['value']."<br/>\n";
1197 END MindFlow < v1.4 data conversion
1199 performance fix : store width and height with the image to avoid parsing them from the file every time they are required
1215 make sure a slug has a unique value when a key named 'slug' is defined
1230 print_r($keyData['value'][$template_key]['value'][$mtKey]['microtemplate_data'][$mtDataKey]['value']);
1245 END MindFlow < v1.4 data conversion
1247 cleanup template information and keep only the values
1266 echo('dbRecord->getKeySQL() : '.$l10n->getLabel('dbRecord','key').' '.$keyName.' '.$l10n->getLabel('dbRecord','no_attr').' "value"'.chr(10));
1299 prepare SQL
1333 display all fields by default
1343 display user defined list of fields
1381 boolean processes action links as ajax requests rather than as regular links
1382 string allows inserting some custom HTML code on top of the record edit table, usualy a create new record button
1383 string coma separated list of field names. removes from the recordEditTable display some columns specified in the SELECT of the request. This can be usefull if you need to have some field value retrevied for usage in a keyprocessor function, but you do not want it to be displayed
1384 int overrides the default number of rows per page
1385 'showNumRowsPerPageSelector' => true, //boolean displays a selector allowing the user to set the number of rows per page
1386 boolean shows the total number of results
1387 force listing the records not only from current language, but from all languages
1388 adds custom CSS classes to array columns. Useful for responsive design or other purpose.
1392 show SQL request
1393 displays print button
1394 disables the display of buttons useless for printed version arround the record table
1395 set available buttons in edit / create record forms opened in AJAX from the showRecordEditTable view
1403 'onsubmit'=>'sendForm();',
1408 selects edit or view action when clicking the link on a record's title in the showRecordEditTable
1427 buttons HTML displayed on top of the showRecordEditTable
1430 Default values for request
1452 values adaptation
1517 create an instance of the record, so the language file is properly loaded
1518 $loadL10nRecord = new $recordClass();
1530 add user supplied buttons
1535 echo "class dbRecord.php init() showRecordEditTable() classname=".$recordClass." moduleName =".$moduleName." subModuleName =".$subModuleName." tableName =".static::getTableName()."<br />";
1540 we need to know the total record number in the table for displaying the pager
1561 inserting div for creating/displaying dialogs if not available in the page.
1566 document.write("<div id=\"mf_dialogs\"></div>");
1585 "dialog" for jQuery UI dialog, "window" for browser window
1594 deleteLink is the called URL for effectively erasing the record. The URL must return a JSON message, with a field "result" with value either "error" or "success".
1595 this will generate the message displayed in the dialog
1609 update record list view to integrate the current record data changes to the list
1626 update record list view to integrate the current record data changes to the list
1640 update record list view to integrate the current record data changes to the list
1655 update record list view to integrate the current record data changes to the list
1666 var query = theURL.substr(1);
1720 $(\'#deleteMessage\').html( "'.$l10n->getLabel('backend','areyousure_delete').'\""+ decodeURI(title).replace(/\+/g, " ") +"\" ?'.'" );
1721 $(\'#windowTitleDialog_'.$recordEditTableID.'\').modal(\'show\');
1723 console.log(" getDeleteModal titre="+title + " deleteUrl="+deleteUrl+ " isAjax="+isAjax+ " uid="+uid);
1727 openDialog("delete_modal", "windowTitleDialog_'.$recordEditTableID.'", mf.dialogManager.getLastDialog(), d_url, d_width, d_closeAction, title);
1741 update record list view to integrate the current record data changes to the list
1771 form security variables
1783 AJAX REQUESTS
1792 Refresh with last request on ajax save + windows closing
1797 workaround when quotes are needed in sorting field, such as when using such syntax :
1798 "FIELD(status, \"pending\",\"payment_failure\",\"archived\")"
1799 in such case, call updateRecordEditTable() with an urlencoded version of your sorting field as first argument
1806 update the record table
1826 index = jsonData.added_index;
1828 console.log(jsonData);
1839 form security variables
1854 printing only current result page
1858 printing all results
1867 update the record table
1915 display the record pager
1917 echoValue('totalRecordCount',$totalRecordCount);
1918 echoValue('maxRecordsPerPage',$maxRecordsPerPage);
1921 get the current page URL and strip an eventual previous &page parameter
1922 parse the current URL request
1925 convert and decode $parsedUrl['query'] as an array of parameters
1937 figure if we should prefix page= with ? or &
1942 convert url variable to string
1945 display pager if there are more records than $config['max_records_per_page'], that is $maxRecordsPerPage
1956 limit pager display to 10 pages around the current page
1961 show "..." if there are more pages available than currently displayed
1973 computing displayed records bounds
1984 displaying only the results count
1989 if(!$advancedOptions['printMode'])$html = array_merge($html,$pager);
1991 display the buttons, except when the page is called in print mode
2025 paginated SQL request
2032 echo $sql;
2036 echo $sql;
2053 print_r($rows);
2055 preparing values
2060 filter spaces
2061 seek alias and remove it from key name
2063 we have an alias
2086 glyphicon glyphicon-arrow-down
2093 echo colum name
2095 get label from current record's class
2099 get label from class name supplied as alias
2105 glyphicon glyphicon-arrow-down
2121 valeur à retourner si le filtre échoue
2129 $this->data[$key]['value'] = $rows[$key];
2133 print_r($row);
2139 PREPARE ACTION LINKS
2152 fix strings to integers because some tests below would fail otherwise
2164 disable form autocompletion
2170 ignore the create action, as it is processed once at the showRecordEditTable level (the create button is on top of the showRecordEditTable)
2171 but not at each record row
2173 make view link
2177 process boolean value
2180 default Mindflow link for viewing a record
2182 form security variables
2205 form security variables
2229 arbitrary column name marker. Automatically replace {markerName} with $row['markerName']
2243 make edit link
2247 process boolean value
2252 form security variables
2271 default Mindflow link for editing a record
2276 form security variables
2301 arbitrary column name marker. Automatically replace {markerName} with $row['markerName']
2314 make delete link
2319 process boolean value
2322 default Mindflow link for deleting a record
2326 delete
2327 form security variables
2341 restore
2342 form security variables
2358 delete
2359 form security variables
2371 restore
2372 form security variables
2385 "{subdir}/mf/index.php?module='.$moduleName.(($subModuleName!='')?'&submodule='.$subModuleName:'').'&action=delete&class='.$recordClass.'&uid=" + deleteRecordUid;
2391 delete
2412 arbitrary column name marker. Automatically replace {markerName} with $row['markerName']
2431 delete modal
2435 do nothing for restore link
2443 process boolean value
2445 default Mindflow link for sorting a record
2447 form security variables
2460 form security variables
2484 arbitrary column name marker. Automatically replace {markerName} with $row['markerName']
2501 process boolean value
2503 default Mindflow link for sorting a record
2505 form security variables
2518 form security variables
2542 arbitrary column name marker. Automatically replace {markerName} with $row['markerName']
2558 process boolean value
2560 default Mindflow link for cloning a record
2562 form security variables
2575 form security variables
2599 arbitrary column name marker. Automatically replace {markerName} with $row['markerName']
2612 make custom link and replace supplied markers with values extracted from the displayed record. See list of available markers below :
2614 $recordActionKey." ";
2626 arbitrary column name marker. Automatically replace {markerName} with $row['markerName']
2640 end switch($action);
2645 DISPLAY ROW KEYS
2647 echo "key=".$key." row['".$key."']=".$row[$key]."<br>\n";
2649 echo "<br />\n<br />\n";
2652 echo "row=".print_r($row, true)."<br />\n";
2658 process key for display with optional user supplied processing function.
2663 Add open record link on title if mainKey
2687 DISPLAY ACTION ICONS
2688 $linkClass = (isset($advancedOptions['ajaxActions']) && $advancedOptions['ajaxActions'])?" class='open_ajax'":"";
2691 view link
2694 edit link
2698 sort link
2702 clone link
2730 restore icon
2732 print_r($row);
2733 delete link
2736 deleted icon
2761 display "no page in table" message
2849 preparing request only once
2850 uid = :uid AND
2906 standard key processing functions for displaying in showRecordEditTable
3011 if this record already has an uid (update record), the slug might already exist so exclude it from the search
3014 search for already existing slug
3019 count existing slugs with the same value
3023 slug already exists, append increment to it to make it unique
3053 $query = $pdo->quote('%'.$searchValue.'%');
3060 deal with fulltext search
3065 if($fulltextFieldString != '') $fulltextFieldString = (($equalFieldString != '')?' OR ':'').$fulltextFieldString;
3068 deal with varchar search
3081 deal with strict equality search
3115 we need to access the calling record data structure in order to look for the keyProcessors defined in the calling field. Let's create one, for this purpose
3169 erase uid so a new database entry will be created on the next store()

plugins/mf_countryData/index.php 4

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
61 add records
67 add modules
72 define available plugin user rights

core/formFields/textareaField.php 20

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
21 for 50 columns and 5 rows
28 value of the id attribute of the <form> tag this field is included in
29 the mode value allows discriminating between templates (mode=="template|") and microtemplates (mode=="micro|")
30 this is an numeric array of every arguments included in the 'dataType' index of the field. example : $MyField['dataType']='input text' gets available as array(0 => 'input', 1=> 'text')
31 this is the unique key (or field name/identifier ) for the currentField. Exemple : 'clientName'
32 this is the data array of the current field
33 the uid (Unique ID) of the record containing the current field
34 the class name of the record containing the current field
35 all the data for the record containing the current field
36 field name when processing a microTemplate field (only used when mode=="micro|")
37 sorting index when processing a microTemplate field (only used when mode=="micro|")
47 display the label in front of the field or not
50 display a <div> around the field or not
53 display custom HTML in front of the field
56 display custom HTML in after the field
59 display custom HTML in front of the field
62 display custom HTML in after the field
75 read only record display, no input editing
86 input editing

plugins/mf_searchEngine/languages/records/mfSearchIndex_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

plugins/mf_searchEngine/modules/webSearch.php 24

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
51 paginated SQL request
56 preparing request
66 display the record pager
68 echoValue('totalRecordCount',$totalRecordCount);
69 echoValue('maxRecordsPerPage',$maxRecordsPerPage);
72 get the current page URL and strip an eventual previous &page parameter
73 parse the current URL request
76 convert and decode $parsedUrl['query'] as an array of parameters
88 figure if we should prefix page= with ? or &
93 convert url variable to string
96 display pager if there are more records than $config['max_records_per_page'], that is $maxRecordsPerPage
106 limit pager display to 10 pages around the current page
111 show "..." if there are more pages available than currently displayed
129 Crop the digest
132 crop before and after the first searchTerm
135 find first space within length
138 make sure first word is cut before a space and not between letters
143 find last space within length
145 make sure last word is cut after a space and not between letters
149 searchTerms not found in the digest, simply crop the digest from the begining.
152 find last space within length
154 make sure last word is cut after a space and not between letters
168 add another pager after the results

plugins/mf_authentification/mfAuthentification.php 31

Type Line Description
9 www.apache.org/licenses/LICENSE-2.0
36 if there was a module called prior auth, redirect to that module
40 redirect to called url prior login only if this url is in the mf backend (includes '/mf/' in its path)
42 ':((!empty($_SERVER['HTTPS'])) ? "https://" : "http://")).$_SERVER['SERVER_NAME']."/mf/index.php");
44 else redirect to login page
45 ':((!empty($_SERVER['HTTPS'])) ? "https://" : "http://")).$_SERVER['SERVER_NAME']."/mf/index.php");
55 process identification
59 if auth fails, prepare error message for display
62 log failed auth with username
67 success
101 when there is no specific action. This is the login landing page.
103 force SSL if required
105 ".$_SERVER['SERVER_NAME']."/mf/index.php");
109 If there were URL parameters in the URL, save them so they can be restored after login
114 do not save logout URL as this would create a dead en loop
118 do not save install tool URL as it would redirect on it when loging in the MindFlow backend if the install tool has been opened first
122 save otherwise
132 process logout
140 add custom CSS to main CSS
142 prevent including twice due to dual context authentification + backend
176 $moduleBody = str_replace("{connect}",$l10n->getLabel('mfAuthentification','connect'),$moduleBody);
179 $mainTemplate = str_replace("{current_module}",$moduleBody,$mainTemplate);
197 checking username and password against database
200 AND MotDePasse = :password
203 echo "pass=".crypt ( $password, $config['salt'] );
205 ':password' => crypt ( $password, $config['salt'] )
213 echo "rowcount=".$stmt->rowCount();
217 security check against the user altering the SQL request
218 echo 'password_verify('.$password.', '.$hash.')='.password_verify($password, $hash);
220 Valid
229 Invalid

plugins/pages/sitemap-pages.php 4

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
28 we are serving XML
32 create a frontend for being able to use all the mindflow objects
41 www.sitemaps.org/schemas/sitemap/0.9">';

plugins/events/modules/events.php 11

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
34 $mf = &$GLOBALS['mf'];
45 $currentPageUid = $mf->info['currentPageUid'];
50 add the plugin to the backend menus
57 process eventual record submission
78 echo "events.php ACTION=".$this->action."<br />";
91 case edit requested by some module as a GET url parameter
95 case we just re-edit the last saved record
148 $buttons = '<button class="btn-sm btn-primary mf-btn-new" type="button" onClick="openRecord(\'{subdir}/mf/core/ajax-core-html.php?action=createRecord&record_classevent&header=0&footer=0&sec='.$secHash.'&fields='.$secFields.'&ajax=1&showSaveButton=1&showSaveCloseButton=1&showPreviewButton=&showCloseButton=1&mode='.$mf->mode.'\',\'70%\',\'\',\''.$l10n->getLabel('event','record_name').'\');">'.$l10n->getLabel('events','new_record').'</button>';
176 'buttons' => $buttons,
234 preparing request only once

plugins/urlRewriter/defaultPluginConfig.php 2

Type Line Description
3 default configuration for the plugin
4 add and edit these values in your config file

cli_scripts/plugin_add_form.php 16

Type Line Description
13 http://php.net/manual/en/features.commandline.php
18 Create new Colors class
115 value for moving to mf root dir
118 create records folder
123 create record php file
127 $formContent = str_replace("{recordClassName}",$recordClassName,$formContent);
129 $formContent = str_replace("{pluginKey}",$pluginKey,$formContent);
131 $formContent = str_replace("{SQLTableName}",$SQLTableName,$formContent);
133 finally, write plugin file
137 create language folder
140 create the record's l10n file
152 add //[/module_include_form] statement
159 add //[/module_insert_form] section
160 inserts form into the prepareData() record listing instruction set
168 write the module file
185 write the json file

core/dbManager.php 8

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
45 constructor with DB parameters supplied as arguments
49 default constructor
86 force catching PHP warnings due to PDO failure to report an Exception in case the db host address is invalid
91 enable PDO errors (not shown by default). See http://php.net/manual/fr/pdo.error-handling.php for more info
93 $opts = array(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
115 invalid db host address exception
132 echo "Mindflow closing MYSQL connexion";

plugins/contacts/modules/contacts.php 30

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
24 include custom contact class or base contact class by default
29 mailer class
53 $mf->addBottomJs('<script src="'.SUB_DIR.$config['backend_template'].'/js/backend-bottom.js"></script>', true, false);
58 displaying form
62 $contactFormMgr->initFormCssAndJS();
74 //document.location = "'.((!empty($_SERVER['HTTPS'])) ? "https://" : "http://") . $_SERVER['SERVER_NAME'].'";
87 }
93 check access rights
98 add the plugin to the backend menus
105 breadcrumb
106 $l10n->getLabel('backend','datas');
125 case edit requested by some module as a GET url parameter
129 case we just re-edit the last saved record
171 breadcrumb
233 Create the message
237 ->setFrom($contact->data['email']['value'])
238 ->setTo(array($contact->data['recipient']['value'] => $contact->data['first_name']['value'].' '.$contact->data['last_name']['value']))
242 load email template
248 put email intro
251 write contact information
253 $contact = new contact();
254 $contact->load($recordUid);
273 put client logo
277 form recording success. Send notification email
280 Create the Transport
281 $transport = Swift_MailTransport::newInstance();
286 Create the Mailer using created Transport
296 Send the message
304 the key for the first entry of this associative array is the "from" email

plugins/pages/languages/modules/pages_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

plugins/mf_users/records/mfUserGroup.php 19

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
23 table name in the SQL database
32 ALTER TABLE `mf_usergroup` ADD `parent_uid` INT NOT NULL DEFAULT '0'
37 important declaration, do not remove (would cause bug)
39 base group template for storing rights values
62 cache for uid => group mapping table
68 $this->loadL10n('/mf/plugins/mf_users','records');
71 add the group template to mindflow templates list, but it is hidden (see setting 'hideInTemplateList' above)
87 the template_content key will hold the user rights in a custom form
89 array(),
106 overwrite definition for parent_uid
155 echo "defineUserRight $moduleKey <br />";
158 load the user rights translation file
161 add the form field to the userRights form
166 copy localization keys into the templates localization
173 if($moduleKey=='pages')
174 print_r($GLOBALS['l10n_text']['templates']);
175 cleanup temp localization
185 print_r($this->data['template_content']['value']);

install/update_scripts/1.9/dates.php 13

Type Line Description
9 www.apache.org/licenses/LICENSE-2.0
61 look for date fields
63 echo $fieldName." dataType=".$fieldDef['dataType']."<br />".chr(10);
72 look for datetime fields
74 echo $fieldName." dataType=".$fieldDef['dataType']."<br />".chr(10);
122 save current locale
125 alter table for each locale
127 switch the locale
133 restore current locale
179 look for date fields
181 echo $fieldName." dataType=".$fieldDef['dataType']."<br />".chr(10);
190 look for datetime fields
192 echo $fieldName." dataType=".$fieldDef['dataType']."<br />".chr(10);

plugins/portfolio/languages/modules/portfolio_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

plugins/pages/records/page.php 46

Type Line Description
9 www.apache.org/licenses/LICENSE-2.0
23 table name in the SQL database
74 ALTER TABLE `mf_pages` ADD `hide_lastmod` TINYINT( 4 ) NOT NULL DEFAULT '0'
200 'processor' => '',
218 ALL required for root page
289 merge with dbRecord $this->data using array_merge_recursive_distinct() to owerwrite parent_uid definition
307 create ROOT page
319 Make sure the parent_uid is never lower thant root page's uid
326 current page should not be listed in parent_uid list (would create infinite loop)
334 current page should not be listed in parent_uid list (would create infinite loop)
349 if url_path_segment == "new_page" && title != "new page", update the path segment with the real title
354 always clean up the segment to make sure the user has not added some bad characters
358 Fix for infinite loops in case this page parent_uid = this page uid
360 attach the page to the root page so it still can be seen, and prevent memory exhaustion
364 Make sure the parent_uid is never lower thant root page's uid
372 desactivates a record in the database. The record can be recovered by switching its deleted field back to 0.
376 we will not allow deleting a site root page
389 remove the page from the search engine index
406 $this->data[$key]['value'] = $row[$key];
409 echo "*** loadPageFromRow ***";
410 print_r(unserialize($this->data['template_content']['value']));
411 echo "<br /><br /><br /><br />";
412 echo "titre=".$this->data['title']['value']." ".$this->data['uid']['value']."<br /><br />";
413 $this->data['template_content']['value'] = unserialize($this->data['template_content']['value']);
440 build indexable values
452 echo "* TRIGGER templateData<br /><br />".chr(10).chr(10);
456 echo "* TRIGGER microtemplate<br /><br />".chr(10).chr(10);
459 fields are indexed only if they have an 'index' property
463 functions
464 calling the function and inserting its output
469 echo "functionOutput=" . $functionOutput . chr(10);
484 remove html tags from rich text
486 make sure _all_ html entities are converted to the plain ascii equivalents - it appears
487 in some MS headers, some html entities are encoded and some aren't
491 build ressource url
494 index the item
510 fields are indexed only if they have an 'index' property
514 functions
515 calling the function and inserting its output
524 we are not indexing array values, such as files entries yet
551 retreive list of active records with one single request (best performance)
553 hidden=0 AND (start_time < NOW() OR start_time == '0000-00-00 00:00:00') AND (end_time > NOW() OR end_time == '0000-00-00 00:00:00')
561 update
564 load the data of the current row in the current class instance
568 don't forget to apply custom load() function overload below, such as unserialization of values and such stuff
569 print_r($this->data);

frontend/templates/mf-default/css/frontend.css.php 3

Type Line Description
4 header('HTTP/1.0 304 Not Modified');
5 header('Cache-Control: max-age=3600, must-revalidate');
16 fonts.googleapis.com/css?family=Oswald|Archivo+Narrow);

plugins/portfolio/records/portfolioCategory.php 6

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
22 table name in the SQL database
40 load translations
41 $this->loadL10n('/mf/plugins/portfolio','records');
106 preparing request only once
134 preparing request only once

plugins/mf_countryData/defaultPluginConfig.php 2

Type Line Description
3 default configuration for the plugin
4 add and edit these values in your config file

plugins/mf_countryData/languages/modules/manageFrance_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

core/formFields/hiddenField.php 12

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
27 value of the id attribute of the <form> tag this field is included in
28 the mode value allows discriminating between templates (mode=="template|") and microtemplates (mode=="micro|")
29 this is an numeric array of every arguments included in the 'dataType' index of the field. example : $MyField['dataType']='input text' gets available as array(0 => 'input', 1=> 'text')
30 this is the unique key (or field name/identifier ) for the currentField. Exemple : 'clientName'
31 this is the data array of the current field
32 the uid (Unique ID) of the record containing the current field
33 the class name of the record containing the current field
34 all the data for the record containing the current field
35 field name when processing a microTemplate field (only used when mode=="micro|")
36 sorting index when processing a microTemplate field (only used when mode=="micro|")
44 $html[] = formsManager::getFieldLabel($f->fieldData, $f->mode, $f->key, $f->recordClassName);

install/tables.php 21

Type Line Description
3 print_r($mf->pluginManager->records);
21 install plugin link
41 one table per locale, show one line per table
42 if the record maintains one table per locale
44 save current locale
47 create a table for each locale
49 switch the locale
57 create table link
63 import initialization data link
69 $html[] = ' <td class="installTableTd"><!--empty--></td>';
71 delete table link
77 restore current locale
82 regular case
88 create table link
94 import initialization data link
100 $html[] = ' <td class="installTableTd"><!--empty--></td>';
102 delete table link
158 save current locale
160 alter the locale
162 create the table
165 restore current locale

plugins/mf_users/languages/backendMenus_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

core/formFields/altLangField.php 22

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
29 value of the id attribute of the <form> tag this field is included in
30 the mode value allows discriminating between templates (mode=="template|") and microtemplates (mode=="micro|")
31 this is an numeric array of every arguments included in the 'dataType' index of the field. example : $MyField['dataType']='input text' gets available as array(0 => 'input', 1=> 'text')
32 this is the unique key (or field name/identifier ) for the currentField. Exemple : 'clientName'
33 this is the data array of the current field
34 the uid (Unique ID) of the record containing the current field
35 the class name of the record containing the current field
36 all the data for the record containing the current field
37 field name when processing a microTemplate field (only used when mode=="micro|")
38 sorting index when processing a microTemplate field (only used when mode=="micro|")
50 display the label in front of the field or not
53 display a <div> around the field or not
56 display custom HTML in front of the field
59 display custom HTML in after the field
62 display custom HTML in front of the field
65 display custom HTML in after the field
77 read only record display, no input editing
88 input editing
124 form security variables
145 submit the file name and update the record in the database
149 console.log(jsonData);

plugins/mf_countryData/languages/userRights_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

cli_scripts/plugin_create.php 9

Type Line Description
13 http://php.net/manual/en/features.commandline.php
18 Create new Colors class
66 suggest class name from pluginName
121 value for moving to mf root dir
124 create plugin folder
127 create plugin index.php file
134 create language folder
137 create plugin language main file
144 create plugin backend menu file

plugins/contacts/languages/contactsPlugin_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

plugins/mf_authentification/languages/mfAuthentification_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

plugins/mf_countryData/records/mfCountry.php 10

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
21 table name in the SQL database
142 'noClearFix' => 1
252 'tab_main'=> array('cn_iso_2','cn_iso_3','cn_short_fr','cn_official_name_local','cn_currency_iso_3','cn_iso_nr','cn_eu_member','fieldset_zip','zip_format_indication','zip_format','zip_regexp','zip_nocodes','zip_single','zip_single_comment','disable_zip_check','zip_notes','colissimo_area')
254 ALL FIELS :
315 process French zip codes directly from the cities database
319 international zip codes
343 check the zip code against the regular expression in the database
345 Validation failed, provided zip/postal code is not valid.
348 Validation passed, provided zip/postal code is valid.

plugins/urlRewriter/languages/modules/urlRewriter_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

plugins/mf_users/languages/mfUsersPlugin_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

plugins/mf_countryData/languages/modules/manageCountries_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

backend/templates/mf-default/css/background.css.php 2

Type Line Description
4 header('HTTP/1.0 304 Not Modified');
5 header('Cache-Control: max-age=3600, must-revalidate');

core/interfaces/formField.php 11

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
27 value of the id attribute of the <form> tag this field is included in
28 the mode value allows discriminating between templates (mode=="template|") and microtemplates (mode=="micro|")
29 this is an numeric array of every arguments included in the 'dataType' index of the field. example : $MyField['dataType']='input text' gets available as array(0 => 'input', 1=> 'text')
30 this is the unique key (or field name/identifier ) for the currentField. Exemple : 'clientName'
31 this is the data array of the current field
32 the uid (Unique ID) of the record containing the current field
33 the class name of the record containing the current field
34 all the data for the record containing the current field
35 field name when processing a microTemplate field (only used when mode=="micro|")
36 sorting index when processing a microTemplate field (only used when mode=="micro|")

core/formFields/dateField.php 25

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
26 eonasdan.github.io/bootstrap-datetimepicker/
33 value of the id attribute of the <form> tag this field is included in
34 the mode value allows discriminating between templates (mode=="template|") and microtemplates (mode=="micro|")
35 this is an numeric array of every arguments included in the 'dataType' index of the field. example : $MyField['dataType']='input text' gets available as array(0 => 'input', 1=> 'text')
36 this is the unique key (or field name/identifier ) for the currentField. Exemple : 'clientName'
37 this is the data array of the current field
38 the uid (Unique ID) of the record containing the current field
39 the class name of the record containing the current field
40 all the data for the record containing the current field
41 field name when processing a microTemplate field (only used when mode=="micro|")
42 sorting index when processing a microTemplate field (only used when mode=="micro|")
60 display the label in front of the field or not
63 display a <div> around the field or not
66 display custom HTML in front of the field
69 display custom HTML in after the field
72 display custom HTML in front of the field
75 display custom HTML in after the field
78 adds jQuery chained calls such as .on('changeDate', function(){$('#fromDate').datepicker('setEndDate', new Date($(this).val()));})
82 we need a unique id for the .wrap("<span class=\"input-group-addon\"></span>") function below
92 read only record display, no input editing
106 unset datetimepickers in view mode
114 input editing
136 set additional custom datetimepicker options according to datetimepicker documentation here
147 }

plugins/mf_countryData/languages/records/mfDepartement_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

plugins/pages/index.php 4

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
29 create the mother of all web pages, with language="ALL" and void title
69 load the translation files
72 inform MindFlow of the new dbRecords supplied by this plugin

plugins/pages/languages/backendMenus_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

plugins/portfolio/languages/portfolioPlugin_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

plugins/welcome/index.php 3

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
60 add module
63 define available plugin user rights

plugins/pages/defaultPluginConfig.php 6

Type Line Description
3 default configuration for the plugin
4 add and edit these values in your config file
6 opens page editing in an ajax dialog rather than by replacing current view
7 'useAJAX' => 'true',
9 executes this function prior rendering any page if defined
10 define the function in your templates.php file

plugins/mf_countryData/languages/forms/countriesFilter_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

core/formFields/timeField.php 23

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
26 eonasdan.github.io/bootstrap-datetimepicker/
33 value of the id attribute of the <form> tag this field is included in
34 the mode value allows discriminating between templates (mode=="template|") and microtemplates (mode=="micro|")
35 this is an numeric array of every arguments included in the 'dataType' index of the field. example : $MyField['dataType']='input text' gets available as array(0 => 'input', 1=> 'text')
36 this is the unique key (or field name/identifier ) for the currentField. Exemple : 'clientName'
37 this is the data array of the current field
38 the uid (Unique ID) of the record containing the current field
39 the class name of the record containing the current field
40 all the data for the record containing the current field
41 field name when processing a microTemplate field (only used when mode=="micro|")
42 sorting index when processing a microTemplate field (only used when mode=="micro|")
60 display the label in front of the field or not
63 display a <div> around the field or not
66 display custom HTML in front of the field
69 display custom HTML in after the field
72 display custom HTML in front of the field
75 display custom HTML in after the field
78 set datetime picker format
81 we need a unique id for the .wrap("<span class=\"input-group-addon\"></span>") function below
90 read only record display, no input editing
101 input editing
126 }

plugins/mf_searchEngine/index.php 6

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
63 load the translation files
64 $l10n->loadL10nFile('backend', $relativePluginDir.'/languages/backendMenus_l10n.php');
66 add records
69 load default plugin
74 define available plugin user rights

core/formFields/inputField.php 23

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
27 value of the id attribute of the <form> tag this field is included in
28 the mode value allows discriminating between templates (mode=="template|") and microtemplates (mode=="micro|")
29 this is an numeric array of every arguments included in the 'dataType' index of the field. example : $MyField['dataType']='input text' gets available as array(0 => 'input', 1=> 'text')
30 this is the unique key (or field name/identifier ) for the currentField. Exemple : 'clientName'
31 this is the data array of the current field
32 the uid (Unique ID) of the record containing the current field
33 the class name of the record containing the current field
34 all the data for the record containing the current field
35 field name when processing a microTemplate field (only used when mode=="micro|")
36 sorting index when processing a microTemplate field (only used when mode=="micro|")
51 display the label in front of the field or not
54 display a <div> around the field or not
57 display custom HTML in front of the field
60 display custom HTML in after the field
63 display custom HTML in front of the field
66 display custom HTML in after the field
70 $html[] = '<div class="container-fluid">';
76 display non editable field
78 read only record display, no input editing
88 display editable field
90 input editing
101 $html[] = '</div>';

plugins/siteInfos/records/siteInfo.php 11

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
21 table name in the SQL database
41 load template translations
46 load the site info template definition
78 first get the current site Info object uid
97 a siteInfo object exists. Load it and return it.
106 there is no siteInfo object defined in the database. Create one, store it and return it.
131 make sure base class dbRecord l10n text is loaded for any record type
137 load l10n text for inherited record types
143 include_once DOC_ROOT.SUB_DIR.'/mf/plugins/siteInfos/languages/siteInfo_l10n.php';
145 merging base class dbRecord existing Labels

plugins/mf_countryData/modules/manageCountries.php 14

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
31 breadcrumb
48 check access rights
54 add the plugin to the backend menus
61 breadcrumb
62 $l10n->getLabel('backend','settings');
82 case edit requested by some module as a GET url parameter
91 case edit requested by some module as a GET url parameter
107 composition du filtre d'affichage
152 breadcrumb
176 count entries in the index
207 'cn_short_fr' => 'mfCountry::utf8Name',
235 $searchIndex->data['fieldName']['value'] = $mf->currentUser->data['NoAccorderie']['value'];
236 $searchIndex->data['fieldName']['editable'] = false;

core/dbForm.php 9

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
30 data value
31 lists the data to show in the edit form by default
32 Array of chunks of HTML code to be displayed after the object's forms
33 fields that have no value and should not be inserted in the database (usually page layout fields)
34 SELECTED MYSQL engine for the inherited class
52 form unique id
69 load l10n text for inherited record types
72 load the current record's translation files

plugins/pages/httpStatusCodes.php 1

Type Line Description
9 www.apache.org/licenses/LICENSE-2.0

plugins/contacts/languages/records/contact_l10n.php 4

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
34 'no_record' => 'There currently exists no contact request. You can <a href="{subdir}/mf/index.php?module=contacts&action=create">create a contact request</a>.',
49 'no_record' => 'Il n\'existe pas de demande de contact pour le moment. Vous pouvez <a href="{subdir}/mf/index.php?module=contacts&action=create">créer une demande de contact</a>.',
65 'no_record' => 'Il n\'existe pas de demande de contact pour le moment. Vous pouvez <a href="{subdir}/mf/index.php?module=contacts&action=create">créer une demande de contact</a>.',

plugins/pages/languages/pagesPlugin_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

core/formFields/recordEditTableField.php 23

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
35 value of the id attribute of the <form> tag this field is included in
36 the mode value allows discriminating between templates (mode=="template|") and microtemplates (mode=="micro|")
37 this is an numeric array of every arguments included in the 'dataType' index of the field. example : $MyField['dataType']='input text' gets available as array(0 => 'input', 1=> 'text')
38 this is the unique key (or field name/identifier ) for the currentField. Exemple : 'clientName'
39 this is the data array of the current field
40 the uid (Unique ID) of the record containing the current field
41 the class name of the record containing the current field
42 all the data for the record containing the current field
43 field name when processing a microTemplate field (only used when mode=="micro|")
44 sorting index when processing a microTemplate field (only used when mode=="micro|")
50 create an instance of our record so we are sure its l10n file is loaded (often it is not).
54 $dataType = $f->fieldData['dataType'];
58 display the label in front of the field or not
61 display a <div> around the field or not
64 display custom HTML in front of the field
67 display custom HTML in after the field
70 display custom HTML in front of the field
73 display custom HTML in after the field
79 input editing
101 $editedRecord = new $f->fieldData['editClass']();
122 $html[] = '<span class="errorMsg col-lg-offset-4 col-lg-8"></span>';
147 convert '' to 0 for strict SQL compliance

plugins/siteInfos/languages/backendMenus_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

plugins/events/languages/modules/events_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

core/interfaces/plugin.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

core/formFields/radioField.php 25

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
27 value of the id attribute of the <form> tag this field is included in
28 the mode value allows discriminating between templates (mode=="template|") and microtemplates (mode=="micro|")
29 this is an numeric array of every arguments included in the 'dataType' index of the field. example : $MyField['dataType']='input text' gets available as array(0 => 'input', 1=> 'text')
30 this is the unique key (or field name/identifier ) for the currentField. Exemple : 'clientName'
31 this is the data array of the current field
32 the uid (Unique ID) of the record containing the current field
33 the class name of the record containing the current field
34 all the data for the record containing the current field
35 field name when processing a microTemplate field (only used when mode=="micro|")
36 sorting index when processing a microTemplate field (only used when mode=="micro|")
43 field editable status takes over options editable status if set
57 display the label in front of the field or not
60 display a <div> around the field or not
63 display custom HTML in front of the field
66 display custom HTML in after the field
69 display custom HTML in front of the field
72 display custom HTML in after the field
75 input editing
84 fix for getFieldLabel() calls
90 field editable status takes over options editable status if set
97 unique ID for each radio input
102 rebuild attribute list to prevent overlay of 'onclick' with default value for the field
116 input editing
128 this field is holding the value which will be retained in the dbRecord when the form is updated.

plugins/mf_countryData/forms/franceFilter.php 8

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
28 important declaration, do not remove (would cause bug)
35 columns descriptions, including autogenerated form settings
93 'tab_main'=>array('htmlTableOpen_filter', 'MotClef_filter', 'htmlTableHalf_filter','Deleted_filter', 'htmlTableClose_filter' )
97 form security variables
109 retreive list of pointDeService
117 update pointDeService select
120 sort alphabetically as javascript is not respecting supplied data order

plugins/mf_searchEngine/forms/searchIndexFilter.php 4

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
23 important declaration, do not remove (would cause bug)
30 columns descriptions, including autogenerated form settings
78 'tab_main'=>array('htmlTableOpen_filter', 'MotClef_filter', 'htmlTableHalf_filter','Deleted_filter', 'htmlTableClose_filter' )

plugins/siteInfos/modules/siteInfos.php 7

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
25 include custom contact class or base contact class by default
42 Load and add the siteInfo template definition to the $mf->templates array
61 $currentPageUid = $mf->info['currentPageUid'];
66 add the plugin to the backend menus
128 load siteInfo object
131 edit object

plugins/urlRewriter/modules/urlRewriter.php 56

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
45 parse the current URL request
48 convert and decode $parsedUrl['query'] as an array of parameters
51 create a copy of the page path,but in array version for convenience
54 retreive URL path length
57 echo "pathSize=". $pathLength."<br />".chr(10);
58 print_r( self::$parsedUrl['pathArray']);
59 echo "<br />".chr(10);
61 trim the extension of the last path segment, in case we have a .html or .htm extension
64 replace the path segment with its value without extension
70 check language from the url if in frontend mode. Setting www.domain.com/fr/ or /en/ will switch the language
71 if no language ISO2 code is supplied, default language will apply
73 set the language & strip the ISO2 code from the url for not disturbing other functions
77 add the parsed URL to the mfInfo object so it can be re-used by plugins :
82 set the page tree in all cases
87 var_dump($currentPage);
88 var_dump(self::$parsedUrl);
95 also show 404 error if the page has been hidden & the admin is not logged into the backend
107 echo "currentPage=".$mf->info['currentPageUid']."<br />".chr(10);
108 print_r(self::$parsedUrl);
143 echo "getCurrentPage() ";
147 process from site root pages. Pages at root level non marked as site root are ignored.
150 retreive URL path length
153 if there are no path segments, return the root page
155 echo "path1 ";
159 echo "path2 ";
173 if there is no page defined
193 if there is a match in the path segment
198 trigger words processing is prioritary
201 echo $currentURLSegment."==".$triggerWordData['word']."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; test=".($triggerWordData['word']==$currentURLSegment)." return page = ".$triggerWordData['page']."<br/>".chr(10);
202 print_r($this->triggerWords);
212 then process regular url path segments
215 if this is the last segment in the path, return the page
216 echo "return ".$page->data['uid']['value']."<br>".chr(10);
220 continue with child pages
226 echo "return ".$candidateUid."<br>".chr(10);
249 check triggerType conformity
255 ad to the list of triggerWords
275 if table mf_pages is available
277 get all the existing pages that have not been deleted
290 convert the rows to an array of page objects where the key is the page uid
298 print_r($mf->info['pageTree']);
299 var_dump($mf->info['pageTree']);
320 first seek the root page(s)
322 echo "parsing pagesByUid page=".$page->data['uid']['value'].chr(10);
323 echo "test=(".$page->data['language']['value']." == ".$language.");<br />";
325 echo "test=(page->data['parent_uid']['value']=".$page->data['parent_uid']['value'].");<br />";
327 echo "adding page=".$page->data['uid']['value']." to root".chr(10);
337 echo "parsing pagesByUid page=".$page->data['uid']['value'].chr(10);
340 echo "adding page=".$page->data['uid']['value']." as child of ".$currentPage->data['uid']['value']."".chr(10);
356 removed because of double call. setPageTree() is already used during prepareData(). It doesn't seem usefull to call it again
357 $this->setPageTree();
365 if there are more than 1 language in use, append the language ISO2 code in the URL
385 if the child page exists
387 process and return the segment
391 if the parent is not the root page, append the segment to the path

plugins/pages/ajax-pages-json.php 21

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
30 we are serving json
33 check the security hash. No request will be honored if the security hash is not supplied or if there is a mismatch
39 create a backend for being able to use all the mindflow objects
43 create a backend for being able to use all the mindflow objects
54 updating parent->child relationships
57 update page parent
68 update the page tree so we can read up-to-date information on page structure
71 now updating sorting
72 poor performance (updates all records in the tree while only one has moved)
73 but easyest way to do due to poor info collected from the $pages data supplied
87 create an instance of the object to be updated
92 insert defaut template structure in template_data field so the page can be used immediately without having to hit the save button
96 create the record
99 now updating sorting for next pages (newly created page appears first)
100 poor performance (updates all records in the tree while only one has moved)
101 but easyest way to do due to poor info collected from the $pages data supplied
119 form security variables
138 $html[] = "<span class=recordAction><a href='".SUB_DIR."/mf/index.php?module=pages&action=edit&uid=".$uid."' title='".$l10n->getLabel('backend','edit')."'><i class='glyphicon glyphicon-pencil'></i></a></span>";
180 echo "Error : No action specified.";
186 echo "Error : Invalid securityToken supplied.";

mf.php 71

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
32 This library is intended to provide forward compatibility with the password_* functions of PHP 5.5.
39 this is the PDO database object which can be used directly from any class to access the database
42 this is the localisation (l10n) manager which takes car of dealing with translation files
45 loads and manages plugins
47 shortcut to the modules list
49 handles forms
52 allows checking if mindflow is running in 'backend' or 'frontend' mode
55 access to the backend object
56 var $backend;
57 access to the frontend object
58 var $frontend;
60 stores the current frontend or backend instance, according to the execution mode of MindFlow
63 currentBackendUser
68 stores the various templates available for the current website
72 html objects used for outputing the page
76 used to show errors in the frontend. The templates must supply the {mindflow-messages} marker for those messages to show up
78 usefull datasets
79 stores all informations related to the current website one might need
82 var $mainCSS = '';
84 List of css files to link in the page
85 Javascript files called in the page header
86 Javascript files called at the end of the page to prevent page loading slowdowns
87 Javascript files called when loading microtemplates
94 true if the uploads directory should feature the locale into the path.
100 add to global var for easier access and nicer syntax
103 add to global var for easier access and nicer syntax
106 set default locales
108 frontend language currently being edited in the backend
112 language currently displayed in the frontend
115 language of the backend UI
119 instantiate the autoloader
122 register the autoloader
125 register the base directories for the namespace prefix of the required librairies
129 define a unique render ID, so if 2 pages are rendered at the same time, the ID will allow to distinct the render run in the log
132 Create the Monolog logger
135 Now add the configured handlers
137 look for user configured handlers
142 if not available, fallback to Mindflow sample default configuration
145 if not available, fallback to a solution that works in every case
159 allow many concurrent sessions : sessions are garbage collected too quickly on some servers
163 creating session for storing data
171 default HTTP status code
174 an array of all page objects sorted by parent / child relationship. This is filled up by urlRewriter->setPageTree()
177 an array of all page objects sorted by uid. This is filled up by urlRewriter->setPageTree()
179 var $pagesByUid
181 setting local timezone for timestamping debug log
184 create localisation manager
188 create database manager and open connexion
195 create html object for storing html to be displayed
198 array for storing template objects
203 Set up default CSS and JS, common to frontend and backend
209 mf init JS
212 jQuery
213 $this->addTopJs('<script src="'.SUB_DIR.'/mf_librairies/jQuery/jquery-1.12.4.min.js?v=1"></script>',true,true);
215 $this->addTopJs('<script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>',true,true);
219 Bootstrap
222 Fancybox
225 create formsManager
229 create plugin manager last so all standard objects are already built and accessible from plugins
235 initialize javascript framework
238 $this->addTopJs('<script src="'.SUB_DIR.'/mf/core/ressources/js/mfDialogs.js?v=1"></script>',true,true);
239 $this->addTopJs('<script src="'.SUB_DIR.'/mf/core/ressources/js/mfForms.js?v=1"></script>',true,true);
241 make frontend language available for js
244 set labels required in js files
267 print_r($this->currentUser->data);
268 echo "<br/><br/>";
314 filter values to prevent SQL injections
317 update language
342 print_r($this->info['pageTree']);
346 recherche de la page accueil (uid=1) et de ses sous-pages sous la racine du site

plugins/mf_countryData/ajax-search-json.php 12

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
25 we are serving json
28 create a backend for being able to use all the mindflow objects
34 print_r($_REQUEST);
36 check the security hash. No request will be honored if the security hash is not supplied or if there is a mismatch
47 process the form
54 traitement des paramètres du formulaire
70 echo "conditions = ".$sqlConditions;
92 process the form
97 traitement des paramètres du formulaire
108 echo "conditions = ".$sqlConditions;
142 echo "Error : No action specified.";

plugins/events/defaultPluginConfig.php 2

Type Line Description
3 default configuration for the plugin
4 add and edit these values in your config file

plugins/portfolio/modules/portfolio.php 15

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
41 $currentPageUid = $mf->info['currentPageUid'];
46 add the plugin to the backend menus
53 process portfolioItemual record submission
74 echo "portfolio.php ACTION=".$this->action."<br />";
131 show portfolio by default
177 case edit requested by some module as a GET url parameter
181 case we just re-edit the last saved record
187 case edit requested by some module as a GET url parameter
191 case we just re-edit the last saved record
257 list portfolio
302 $portfolioPagesUids = explode(',',$config['plugins']['portfolio']['portfolio-pages-uids']);
304 if(in_array($mf->info['currentPageUid'],$portfolioPagesUids)){
309 }
348 preparing request only once

core/formFields/templateNameField.php 25

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
27 value of the id attribute of the <form> tag this field is included in
28 the mode value allows discriminating between templates (mode=="template|") and microtemplates (mode=="micro|")
29 this is an numeric array of every arguments included in the 'dataType' index of the field. example : $MyField['dataType']='input text' gets available as array(0 => 'input', 1=> 'text')
30 this is the unique key (or field name/identifier ) for the currentField. Exemple : 'clientName'
31 this is the data array of the current field
32 the uid (Unique ID) of the record containing the current field
33 the class name of the record containing the current field
34 all the data for the record containing the current field
35 field name when processing a microTemplate field (only used when mode=="micro|")
36 sorting index when processing a microTemplate field (only used when mode=="micro|")
48 display the label in front of the field or not
51 display a <div> around the field or not
54 display custom HTML in front of the field
57 display custom HTML in after the field
60 display custom HTML in front of the field
63 display custom HTML in after the field
66 we need a unique id for the .wrap("<span class=\"input-group-addon\"></span>") function below
76 read only record display, no input editing
77 seek selected value
83 read only record display, no input editing
95 input editing
102 do not show template name in list if specified to do so
105 select the current template
106 if no template name is defined in $f->fieldData, the first one in the available template list will be used

plugins/mf_users/modules/users.php 17

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
32 breadcrumb
44 $currentPageUid = $mf->info['currentPageUid'];
56 add the plugin to the backend menus
64 breadcrumb
65 $l10n->getLabel('backend','administration');
81 case edit requested by some module as a GET url parameter
85 case we just re-edit the last saved record
124 breadcrumb
156 only admin users can create users in this module
157 if($mf->currentUser->data['user_group']['value'] > ADMINISTRATEUR)
161 default date conditions
162 if($dateConditions=='')$dateConditions = ' AND DateAffichage <= CURDATE()'; //AND DateFin >= CURDATE()
208 remove useless keys
244 setup AJAX output
246 disable fields editing
252 create and publish the record form

plugins/welcome/languages/userRights_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

languages/installToolLoginForm_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

plugins/mf_countryData/languages/records/mfFrance_l10n.php 2

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
44 'no_record' => 'Aucun résultat.',

languages/dbRecord_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

plugins/welcome/defaultPluginConfig.php 2

Type Line Description
3 default configuration for the plugin
4 add and edit these values in your config file

plugins/contacts/languages/userRights_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

core/formFields/dateTimeField.php 25

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
26 eonasdan.github.io/bootstrap-datetimepicker/
33 value of the id attribute of the <form> tag this field is included in
34 the mode value allows discriminating between templates (mode=="template|") and microtemplates (mode=="micro|")
35 this is an numeric array of every arguments included in the 'dataType' index of the field. example : $MyField['dataType']='input text' gets available as array(0 => 'input', 1=> 'text')
36 this is the unique key (or field name/identifier ) for the currentField. Exemple : 'clientName'
37 this is the data array of the current field
38 the uid (Unique ID) of the record containing the current field
39 the class name of the record containing the current field
40 all the data for the record containing the current field
41 field name when processing a microTemplate field (only used when mode=="micro|")
42 sorting index when processing a microTemplate field (only used when mode=="micro|")
60 display the label in front of the field or not
63 display a <div> around the field or not
66 display custom HTML in front of the field
69 display custom HTML in after the field
72 display custom HTML in front of the field
75 display custom HTML in after the field
78 adds jQuery chained calls such as .on('changeDate', function(){$('#fromDate').datepicker('setEndDate', new Date($(this).val()));})
81 we need a unique id for the .wrap("<span class=\"input-group-addon\"></span>") function below
91 read only record display, no input editing
106 input editing
135 timeFormat: "HH:mm:ss",
136 controlType: "select"';
141 }

plugins/portfolio/index.php 2

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
61 load the translation files

plugins/mf_users/records/mfUser.php 47

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
25 table name in the SQL database
61 important declaration, do not remove (would cause bug)
64 cache for uid => username mapping table
74 create default admin user (user "admin" / password "1234")
90 $this->loadL10n('/mf/plugins/mf_users','records');
101 1 => $l10n->getLabel('mfUser','mrs'),
102 2 => $l10n->getLabel('mfUser','mr'),
197 default locale for frontend display
205 default locale for backend display
222 userGroup to inherit rights from
223 userGroup to inherit rights from
226 mfUserGroup group_name
227 single or multiple
296 ville::listVillesByUid(),
299 'updateArrondissements();updateQuartiers();'
310 region::listRegionsByUid(),
313 'updateVilles();'
360 disable editing of some fields
371 'frontend_locale', 'backend_locale',
372 'address', 'home_phone', 'mobile_phone', 'work_phone', 'city', 'region', 'zip', 'notes', 'sex', 'birthdate')
420 if the password has changed, crypt the new password
421 echo "Password has changed, cryptPassword returns ".crypt($newValue, $config['salt'])."<br />".chr(10);
424 else do not alter the password, as it is already encrypted
426 echo "Password is the same, cryptPassword returns ".$previousValue."<br />";
437 echo "password has not changed confirmPassword returns 1<br />".chr(10);
441 else validate
443 if the password has changed, test against confirmation
444 echo "password has changed, test against confirmation confirmPassword returns ".($_REQUEST['record|password_confirmation'] == $_REQUEST['record|password'])."<br />.chr(10)";
473 Generate new password
477 build recipient list
480 Send the password
481 Create the message
506 ".$_SERVER['SERVER_NAME']."/mf/index.php'>".$l10n->getLabel('mfUser','click_here')."</a> ".$l10n->getLabel('mfUser','to_connect')."</p>
510 put client logo
511 $image = '<p><img src="' .$message->embed(Swift_Image::fromPath(DOC_ROOT.SUB_DIR.$config['plugins']['contacts']['email-image'])).'" alt="Image" /></p>';
512 $emailTemplate = str_replace("{email-image}",$image,$emailTemplate);
514 form recording success. Send notification email
517 Create the Transport
523 Create the Mailer using created Transport
533 Send the message
549 Update user's password with new password
563 performance tweak, accorderies are loaded only once if repetitive calls
573 no SQL query performed if array is already loaded in singleton
577 preparing request only once
621 reload user profile
624 reload userGroup as well

plugins/siteInfos/defaultPluginConfig.php 2

Type Line Description
3 default configuration for the plugin
4 add and edit these values in your config file

languages/database_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

core/formFields/fieldset.php 11

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
27 value of the id attribute of the <form> tag this field is included in
28 the mode value allows discriminating between templates (mode=="template|") and microtemplates (mode=="micro|")
29 this is an numeric array of every arguments included in the 'dataType' index of the field. example : $MyField['dataType']='input text' gets available as array(0 => 'input', 1=> 'text')
30 this is the unique key (or field name/identifier ) for the currentField. Exemple : 'clientName'
31 this is the data array of the current field
32 the uid (Unique ID) of the record containing the current field
33 the class name of the record containing the current field
34 all the data for the record containing the current field
35 field name when processing a microTemplate field (only used when mode=="micro|")
36 sorting index when processing a microTemplate field (only used when mode=="micro|")

plugins/pages/modules/pages.php 73

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
56 add nested sortable
76 case edit requested by some module as a GET url parameter
115 process functions registered by other plugins on page load. Example purpose : create a statistics record when a page is loaded
116 functions must be registered using the addFrontendHook() method
127 Processing HTTP Status codes in case $mf->info['http_status'] has been altered
136 Load custom HTTP Status page
146 Load the current page to be displayed
149 increase view count if the current user is not logged into the back office
155 extracting template
167 print_r($page);
180 here we are in the record definition (recorded directly in the database)
182 main case
189 microtemplate case
194 functions
195 calling the function and inserting its output
203 here we are in the template definition (recorded as a serialized array in the database)
205 echo 'templateKey='.$templateKey.'<br />'.chr(10);
206 if($templateKey == 'titre-page') echo 'titre-page='.$templateValue['value'].'<br />'.chr(10);
207 print_r($page->data);
217 substituting values
222 re-process page header values in case they were included by a function
262 look for specific markers with arguments such as {link} {url} or {label}
318 404 page not found
320 $html[] = $_SERVER['REQUEST_URI'];
324 print_r($page->data['template_content']);
338 force page form to reloaded when saved as different view of the fields may occur after page properties change
355 force page form to reloaded when saved as different view of the fields may occur after page properties change
378 form security variables
392 remove no page message in case it would be present.
394 delete the <li> entry of the page from the DOM on success
405 inserting div for creating/displaying dialogs if not available in the page.
414 form security variables
424 'dialog' for jQuery UI dialog, 'window' for browser window
440 protectRoot: true,
461 var fancyboxProxy = $.fancybox;
471 these are root pages
481 display the table header
488 display "no page in table" message
516 form security variables
529 delete the <li> entry of the page from the DOM on success
539 form security variables
568 form security variables
580 console.log(jsonData);
623 these are sub-root (child) pages
645 Select page navigation title if available
649 special case check for page navigation title
657 $html[] = "<i class='glyphicon glyphicon-move'></i>";
661 DISPLAY ACTION ICONS
664 $useAJAX = (isset($config['plugins']['pages']['useAJAX']))?$config['plugins']['pages']['useAJAX']:true;
665 $linkClass = ($useAJAX)?" class='open_ajax'":"";
668 if($useAJAX){
670 form security variables
687 default Mindflow link for editing a record
692 form security variables
703 edit page action
704 $html[] = "<span class=recordAction><a".$linkClass." href='".$editLink."' title='".$l10n->getLabel('backend','edit')."'><i class='glyphicon glyphicon-pencil'></i></a></span>";
707 if($useAJAX)
708 else $html[] = "<span class=recordAction><a href='{subdir}/mf/index.php?module=".$moduleName."&action=edit&uid=".$page->data['uid']['value']."' title='".$l10n->getLabel('backend','edit')."'><i class='glyphicon glyphicon-pencil'></i></a></span>";
712 show hide page action
715 delete page action
766 overriding template value with page record value
767 we are iteration through the template definition only to have it up to date
771 test to skip residual values from former template after switch on the page
778 echo "\$templateKey=".$templateKey." datatype=".substr($templateValue['dataType'],0,5)."<br />\n";
780 microtemplate case
785 include case
802 main case
807 function
808 calling the function and inserting its output
810 retreive the function name directly from the template in case its definition gets updated
813 call the function with the current page object and current fieldName as an argument
815 echo '$functionOutput ='.$functionName.'($page, $templateKey, $templateValue[\'value\']);'.'<br/>'.chr(10);

plugins/mf_searchEngine/languages/modules/searchIndexer_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

languages/installTool_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

core/formFields/htmlField.php 11

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
27 value of the id attribute of the <form> tag this field is included in
28 the mode value allows discriminating between templates (mode=="template|") and microtemplates (mode=="micro|")
29 this is an numeric array of every arguments included in the 'dataType' index of the field. example : $MyField['dataType']='input text' gets available as array(0 => 'input', 1=> 'text')
30 this is the unique key (or field name/identifier ) for the currentField. Exemple : 'clientName'
31 this is the data array of the current field
32 the uid (Unique ID) of the record containing the current field
33 the class name of the record containing the current field
34 all the data for the record containing the current field
35 field name when processing a microTemplate field (only used when mode=="micro|")
36 sorting index when processing a microTemplate field (only used when mode=="micro|")

core/formFields/checkboxField.php 28

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
29 value of the id attribute of the <form> tag this field is included in
30 the mode value allows discriminating between templates (mode=="template|") and microtemplates (mode=="micro|")
31 this is an numeric array of every arguments included in the 'dataType' index of the field. example : $MyField['dataType']='input text' gets available as array(0 => 'input', 1=> 'text')
32 this is the unique key (or field name/identifier ) for the currentField. Exemple : 'clientName'
33 this is the data array of the current field
34 the uid (Unique ID) of the record containing the current field
35 the class name of the record containing the current field
36 all the data for the record containing the current field
37 field name when processing a microTemplate field (only used when mode=="micro|")
38 sorting index when processing a microTemplate field (only used when mode=="micro|")
56 display the label in front of the field or not
59 display a <div> around the field or not
62 display custom HTML in front of the field
65 display custom HTML in after the field
68 display custom HTML in front of the field
71 display custom HTML in after the field
76 rebuild attribute list to prevent overlay of 'onclick' with default value for the field
94 display non editable field
96 display field with label after field (swapped label)
99 read only record display, no input editing
109 display field with label in front of the field (regular case)
112 read only record display, no input editing
123 display editable field
125 display field with label after field (swapped label)
128 input editing
140 display field with label in front of the field (regular case)
142 input editing

plugins/contacts/records/contact.php 2

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
22 table name in the SQL database

plugins/mf_searchEngine/languages/forms/searchIndexFilter_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

plugins/events/languages/records/event_l10n.php 3

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
31 'no_record' => 'There currently exists no event. You can <a href="{subdir}/mf/index.php?module=events&action=create">create an event</a>.',
44 'no_record' => 'Il n\'existe pas d\'évènement pour le moment. Vous pouvez <a href="{subdir}/mf/index.php?module=events&action=create">créer un évènement</a>.',

plugins/welcome/languages/welcomePlugin_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

core/records/simpleRecord.php 22

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
30 name of the SQL table
31 if set to true, mindflow will create and manage one table per locale. Each table will feature a suffix for the locale, such as _fr, _en or _de
32 SQL for the inherited class
33 SQL keys for the inherited class
35 Enables initializing the table with data imported from function importInitializationData()
38 flags for features
39 storing record history impacts performance, so it is disabled by default
40 forces re-evaluating and displaying the record's editing form throught AJAX feedback once the record is saved. Useful if some value affects the form aspect. Disabled by default for performance optimization.
42 SQL for the dbRecord class : all mindflow records must have these fields available
45 ALTER TABLE `vz_orders_CB_fr` ADD `history_last` TEXT NOT NULL DEFAULT '' AFTER `alt_language`, ADD `history_past` TEXT NOT NULL DEFAULT '' AFTER `history_last`;
47 SQL for the keys of the dbRecord class : all mindflow records must have these fields available
126 if($pdo->exec($sql) !== false) { return 1; }
127 else return 0;
140 Temporary variable, used to store current query
142 Read in entire file
147 Loop through each line
150 Skip it if it's a comment
154 Add this line to the current segment
156 If it has a semicolon at the end, it's the end of the query
159 Perform the query
179 Reset temp variable to empty

install/update_scripts/1.9/parent.php 5

Type Line Description
9 www.apache.org/licenses/LICENSE-2.0
65 save current locale
68 alter table for each locale
70 switch the locale
76 restore current locale

core/ajax-core-html.php 42

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
33 sometimes we need to get a full page HTML output as json
37 main case : we are serving HTML
42 create a backend for being able to use all the mindflow objects
46 create a backend for being able to use all the mindflow objects
58 check the security hash. No request will be honored if the security hash is not supplied or if there is a mismatch
62 put you AJAX HTML in this var, the base HTML template from templates/your_backend_theme_name/ajax.html will be wrapped around with header + footer
73 create an instance of the object to be updated
76 mask creation_date and modification_date even if specified by the programmer : these values will be autofilled.
92 argument must be sent in the url using urlencode(base64_encode(http_build_query($advancedSettings)))
105 argument must be sent in the url using urlencode(base64_encode(http_build_query($formAttributes)))
115 setup AJAX output
116 create and publish the record form
124 create an instance of the object to be updated
135 argument must be sent in the url using urlencode(base64_encode(http_build_query($advancedSettings)))
159 load its content
162 setup AJAX output
164 disable fields editing
168 create and publish the record form
177 create an instance of the object to be updated
188 argument must be sent in the url using urlencode(base64_encode(http_build_query($advancedSettings)))
201 argument must be sent in the url using urlencode(base64_encode(http_build_query($formAttributes)))
210 load its content
213 setup AJAX output
214 create and publish the record form
223 create an instance of the object to be updated
237 argument must be sent in the url using urlencode(base64_encode(http_build_query($formAttributes)))
247 setup AJAX output
248 create and publish the record form
259 create an instance of the object to be updated
270 load its content
273 setup AJAX output
274 create and publish the record form
338 required to load l10n file
395 'deleted' => 'dbRecord::getDeletedName'
430 create an instance of the object to be updated
460 Build the HTML
463 process page header
470 processing UI messages
495 set AJAX body
503 process page footer
508 output HTML

plugins/contacts/languages/modules/contacts_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

plugins/portfolio/languages/records/portfolioCategory_l10n.php 3

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
32 'no_record' => 'There currently exists no portfolio category. You can <a href="{subdir}/mf/index.php?module=portfolio&action=create&class=portfolioCategory">create a category</a>.',
46 'no_record' => 'Il n\'existe pas de catégorie pour le moment. Vous pouvez <a href="{subdir}/mf/index.php?module=portfolio&action=create&class=portfolioCategory">créer une catégorie</a>.',

plugins/mf_countryData/modules/manageFrance.php 17

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
31 breadcrumb
46 check access rights
52 add the plugin to the backend menus
58 breadcrumb
59 $l10n->getLabel('backend','settings');
80 case edit requested by some module as a GET url parameter
84 case we just re-edit the last saved record
92 case edit requested by some module as a GET url parameter
96 case we just re-edit the last saved record
111 composition du filtre d'affichage
140 check access rights
154 breadcrumb
180 count entries in the index
207 'cn_short_fr' => 'mfFrance::utf8Name',
234 $searchIndex->data['fieldName']['value'] = $mf->currentUser->data['NoAccorderie']['value'];
235 $searchIndex->data['fieldName']['editable'] = false;

install/update_scripts/1.9/uploadsDir.php 33

Type Line Description
9 www.apache.org/licenses/LICENSE-2.0
18 ALTER TABLE `mf_contacts` CHANGE `start_time` `start_time` DATETIME NULL;
28 remove uploadsDir value in filePath slot from files fields
42 look for files fields
55 echo "\t\t uid= ".$row['uid'].chr(10);
57 load the record
65 $update->data[$fieldName]['filepath'].
67 if($row['uid']==2)echo "***fieldName=".$fieldName. chr(10);
68 echo "isset(\$update->data[".$fieldName."])=".isset($update->data[$fieldName])."<br/>".chr(10);
69 echo "isset(\$update->data[".$fieldName."]['value'])=".isset($update->data[$fieldName]['value'])."<br/>".chr(10);
70 echo "is_array(\$update->data[".$fieldName."]['value'])=".is_array($update->data[$fieldName]['value'])."<br/>".chr(10);
74 echo "replaceValue=" . $replaceValue . chr(10);
75 echo "p1=" . $update->data[$fieldName]['value'][$item]['filepath'] . chr(10);
79 do the replacement
81 echo "p2=" . $update->data[$fieldName]['value'][$item]['filepath'] . chr(10);
87 save the record
102 save current locale
105 alter table for each locale
107 switch the locale
113 restore current locale
136 look for files fields
149 echo "\t\t uid= ".$row['uid'].chr(10);
151 load the record
159 $update->data[$fieldName]['filepath'].
161 if($row['uid']==2)echo "***fieldName=".$fieldName. chr(10);
162 echo "isset(\$update->data[".$fieldName."])=".isset($update->data[$fieldName])."<br/>".chr(10);
163 echo "isset(\$update->data[".$fieldName."]['value'])=".isset($update->data[$fieldName]['value'])."<br/>".chr(10);
164 echo "is_array(\$update->data[".$fieldName."]['value'])=".is_array($update->data[$fieldName]['value'])."<br/>".chr(10);
168 echo "replaceValue=" . $replaceValue . chr(10);
169 echo "p1=" . $update->data[$fieldName]['value'][$item]['filepath'] . chr(10);
173 do the replacement
175 echo "p2=" . $update->data[$fieldName]['value'][$item]['filepath'] . chr(10);
181 save the record

plugins/welcome/languages/modules/welcome_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

cli_scripts/plugin_add_module.php 20

Type Line Description
13 http://php.net/manual/en/features.commandline.php
18 Create new Colors class
42 suggest class name from moduleNaturalName
150 add form ?
161 value for moving to mf root dir
164 create modules folder
167 create module php file
183 writeFile($chdir."/mf_websites/".$websiteFolderName."/plugins/".$pluginDirName.'/modules/'.$moduleClassName.'.php',$moduleContent);
185 filling prepareData() function
211 filling render() function
237 create module json file
242 create language folder
245 create module language main file
252 create ressources folder
255 copy module html template
261 load module in index.php
273 add module access user right
280 write plugin index file
283 create user right l10n file
301 finally, write module file

install/upgrade.php 6

Type Line Description
7 print_r($mf->pluginManager->records);
24 SQL Strict conformance for dates
36 creator
47 parent
58 uploadsDir
69 record history

plugins/mf_searchEngine/languages/userRights_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

plugins/mf_searchEngine/languages/modules/manageSearchIndex_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

core/formFields/colorField.php 20

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
27 value of the id attribute of the <form> tag this field is included in
28 the mode value allows discriminating between templates (mode=="template|") and microtemplates (mode=="micro|")
29 this is an numeric array of every arguments included in the 'dataType' index of the field. example : $MyField['dataType']='input text' gets available as array(0 => 'input', 1=> 'text')
30 this is the unique key (or field name/identifier ) for the currentField. Exemple : 'clientName'
31 this is the data array of the current field
32 the uid (Unique ID) of the record containing the current field
33 the class name of the record containing the current field
34 all the data for the record containing the current field
35 field name when processing a microTemplate field (only used when mode=="micro|")
36 sorting index when processing a microTemplate field (only used when mode=="micro|")
49 $mf->formsManager->addTopJs('colorField','<script type="text/javascript" src="'.SUB_DIR.'/mf_librairies/bootstrap-3-datepicker-4.17/js/bootstrap-datetimepicker.min.js"></script>');
57 display the label in front of the field or not
60 display a <div> around the field or not
63 display custom HTML in front of the field
66 display custom HTML in after the field
69 display custom HTML in front of the field
72 display custom HTML in after the field
83 read only record display, no input editing
94 input editing

cli_scripts/functions.php 19

Type Line Description
70 {targetName}
76 [tagName]
78 [/tagName]
79 {targetName}
84 {module_insert_form} in the code.
85 [item_123] and //[/item_123]
94 trim first line if <?php marker is present
98 ['.$tagName.']') === false) {
105 the tag $tagName can't be found in $targetCode
106 insert section at target location, if it exists
107 {".$targetName."}",
108 ['.$tagName.']'.chr(10).$decay.$sectionCode.chr(10).$decay.'//[/'.$tagName.']'.chr(10).$decay."//{".$targetName."}",
112 echo "***test=true".chr(10);
113 replace existing section
114 [' . $tagName . ']'.' found, replacing it', 'green', null);
115 [' . $tagName . ']', '//[/' . $tagName . ']', chr(10) .$decay.$sectionCode.chr(10).$decay);
120 [drop]
122 [/drop] efhg";
124 echo $targetString.chr(10);

plugins/mf_searchEngine/records/mfSearchIndex.php 4

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
21 table name in the SQL database
41 load translations
42 $this->loadL10n('/mf/plugins/mf_searchEngine','records');

cli_scripts/plugin_add_record.php 19

Type Line Description
13 http://php.net/manual/en/features.commandline.php
18 Create new Colors class
43 suggest class name from moduleNaturalName
135 does this module lists any record ?
197 value for moving to mf root dir
200 create records folder
205 create record php file
214 finally, write plugin file
218 create language folder
221 create the record's l10n file
231 declare/load record into plugin's index.php
242 write plugin index file
245 add record listing
253 update //[/module_list_backend] section
254 add record list switch statement in function prepareData
256 update //[/module_list_backend] section
259 add record listing function to the module's php file
272 write the module file
277 update the module's l10n file

plugins/mf_authentification/defaultPluginConfig.php 2

Type Line Description
3 default configuration for the plugin
4 add and edit these values in your config file

core/pluginManager.php 58

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
33 stores plugin instances
38 stores references to all available dbRecord subclasses
41 stores all the items that should be rendered in the menus
43 stores all the buttons that should be rendered in the menus
78 current user must be defined / logged in to access backend+
82 currentUser must be tested for every plugin in case of logout otherwise it will raise an error
107 current user must be defined / logged in to access backend
110 debug_print_backtrace();die();
111 running plugins
120 must be run AFTER plugins so the backend menu gets populated
144 get rid of nasty spaces
150 loading mindflow plugins
152 mindflow 1.3+ plugin style loading
153 allows loading several plugins per folder
154 the file index.php commands plugin loading
157 loading website plugins
159 mindflow 1.3+ plugin style loading
160 allows loading several plugins per folder
161 the file index.php commands plugin loading
166 MindFlow 1.2 plugin style loading
167 allows loading only one plugin per plugin folder
168 the plugin class name has to be the same as the folder name
170 create a plugin instance
192 create a plugin instance
201 check if the current plugin type is registered
202 if not, automatically create a plugin type classification in the array for it
209 store the plugin classified by its plugin type. This will be used as a render list.
211 or by its name
215 do not add the plugin to the render list, only store it by its name
218 load the plugin's translation files
305 echo "addEntryToBackendMenu $entryHTML, $menuKey, $itemPriority <br />".chr(10);
309 seek menu containing $menuKey
317 create menu if it doesn't exist
319 apply given priority
340 return array_keys($this->backendMenus);
351 print_r($this->backendMenus);
352 print_r($GLOBALS['l10n_text']['backend']);
359 echo "path 1 k=".$menuKey."<br />\n";
361 print_r($menuKey);echo "\n\n";
378 echo "path 2 k=".$menuKey."<br />\n";
403 load plugin class file
411 Automatically load language file for record
422 process all records
445 process all records
453 if the record maintains one table per locale
455 save current locale
458 create a table for each locale
460 switch the locale
462 create the table
466 restore current locale
497 if the record maintains one table per locale
499 save current locale
501 alter the locale
503 create the table
506 restore current locale
543 fix for blocking session error if the admin is logged in the backend and deletes table mf_user
546 create default admin user (user "admin" / password "1234")

core/fileUploader.php 38

Type Line Description
9 www.apache.org/licenses/LICENSE-2.0
27 create a backend for being able to use all the mindflow objects
32 print_r($_REQUEST);
34 check the security hash. No request will be honored if the security hash is not supplied or if there is a mismatch
38 we are serving json
40 HTTP headers for no cache etc
41 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
42 header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
47 Settings
48 Remove old files
50 put the file in the temp directory first
60 convert non url compliant characters
65 name part of the file
69 Clean the fileName for security reasons
89 we make 1 directory per record named like 'class_uid'
101 UPLOAD SUCCESS
103 handle resizing if required
105 create an instance of the object to be updated
107 load its content
114 extract existing value from record data
124 the field is located inside a template data structure
125 update the field inside the template_content field
131 print_r($record->data['template_content']['value'][$micro_key]);
140 the field is not located inside a template data structure, but straight in the record
141 simply update the requested field
146 initialize void value
149 convert MindFlow < v1.4 existing data to array
168 END MindFlow < v1.4 data conversion
170 append the new upload to the record array
182 check file extension
195 check file extension
203 update the value into the record data
206 print_r($record->data);
208 save the updated record
211 update record with uploaded file
212 echo "success ".$_REQUEST['file'];
214 die('{"jsonrpc" : "2.0", "result" : "new field value ='.$newFieldValue.'"}');
218 send back the filename + a fileID that can safely be used as an ID for an HTML element

plugins/mf_users/languages/modules/users_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

core/formFields/filesField.php 65

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
28 value of the id attribute of the <form> tag this field is included in
29 the mode value allows discriminating between templates (mode=="template|") and microtemplates (mode=="micro|")
30 this is an numeric array of every arguments included in the 'dataType' index of the field. example : $MyField['dataType']='input text' gets available as array(0 => 'input', 1=> 'text')
31 this is the unique key (or field name/identifier ) for the currentField. Exemple : 'clientName'
32 this is the data array of the current field
33 the uid (Unique ID) of the record containing the current field
34 the class name of the record containing the current field
35 all the data for the record containing the current field
36 field name when processing a microTemplate field (only used when mode=="micro|")
37 sorting index when processing a microTemplate field (only used when mode=="micro|")
49 delete the file <li> from the DOM on success
52 delete the file name from the hidden input used for file count checking
76 display the label in front of the field or not
79 display a <div> around the field or not
82 display custom HTML in front of the field
85 display custom HTML in after the field
88 display custom HTML in front of the field
91 display custom HTML in after the field
109 initialize void value
112 convert MindFlow < v1.4 existing data to array
121 'filepath' => $config['uploads_directory'].(($localizeUploadsDir)?DIRECTORY_SEPARATOR.$mf->getLocale():'').DIRECTORY_SEPARATOR.$f->recordClassName.DIRECTORY_SEPARATOR.$f->recordClassName.'_'.$f->recordUid.DIRECTORY_SEPARATOR
130 END MindFlow < v1.4 data conversion
136 read only record display, no input editing
178 input editing
194 display files already present in the record
199 using Slug() to make a clean ID with no '_' in order to avoid interference with the key separator using jQuery
202 form security variables
220 display a file icon instead of image preview if the file is not an image
235 <button class="btn btn-sm"><i class="glyphicon glyphicon-fullscreen"></i></button>
245 in case the file field is located inside a template data structure
253 byte symbol translated
257 entrées input accept
261 www.iana.org/assignments/media-types/media-types.xhtml
265 form security variables
288 console.log($(this).sortable("toArray"));
305 actions to be performed when the window is closed
344 position: { my: "center", at: "top+30%", of: parent }, //bug when displaying relative to parent
349 show: { effect: "fadeIn", duration: 500 }
365 optional code for multiples approximation
369 end of optional code
377 stat for counting finished uploads and close the modal once all uploads are done
420 create the object record if it doesn\'t exit yet
423 save our record first because if it is a new record, there will be no database record to save the image information to
424 we need to get a record uid in this case
427 transfer CKEditor content back to the textarea tag before transmitting the form
437 disable field validation so the recording of the image doesn\'t fail in case of erroneous fields
451 update the record uid in the form. This prevents duplicates when a new record is saved twice
458 upload files only after the recordUid has been retreived
461 console.log("FileUpload "+i);
476 upload files
488 form security variables
493 'allowedFileExtensions' => $allowedFileExtensions
501 create the formData object
504 Append our file to the formData object
517 microtemplate specific fields
548 Open our connection using the POST method
555 form security variables
566 handling response
575 retreive the sanitized filename as written on the server disk
584 display a file icon instead of image preview if the file is not an image
600 iterate over filesUploaded array and do logical AND on the uploadsDone value.
601 If one upload is not finished, uploadsDone will be 0 and the modal window should not be hidden yet. Hide it if uploadsDone value is 1 at the end of the loop
608 execute user defined callback function if specified
613 Send the file

frontend/frontend.php 25

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
33 initializes the CMS objects first so they can be exploited by all data processing functions
38 speed measurement stat
42 the $mf object holds the data and provides the standard cms function set to all modules, plugins and services
45 store a reference to this object the $mf object for further reference from all frontend modules
48 load backend localization file for from editing stuff
55 log the frontend initialization
63 process all the functions that have to be executed for the data / page processing
68 load the templates
73 reload current user in case his profile has been modified during a frontend operation (user profile self editing)
78 then prepare backend data
84 executes the render() function of every object and outputs the page
90 processing templates
93 adding custom CSS
101 adding custom JS for the top of the page
109 adding custom JS for the bottom of the page
117 processing UI messages
143 $html[]= $mf->footer;
147 $bodyParams : attributes to be added to the page bodytag
159 adding custom CSS
167 adding custom JS for the top of the page
175 if(isset($config['backend_favicon']) && $config['backend_favicon'] != '')$favicon = $config['backend_favicon'];
176 else $favicon = '/mf/backend/templates/mf-default/ico/favicon.ico';
190 adding custom JS for the bottom of the page
201 clean up all ressources and free memory after MindFlow execution

core/formFields/urlInputField.php 20

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
27 value of the id attribute of the <form> tag this field is included in
28 the mode value allows discriminating between templates (mode=="template|") and microtemplates (mode=="micro|")
29 this is an numeric array of every arguments included in the 'dataType' index of the field. example : $MyField['dataType']='input text' gets available as array(0 => 'input', 1=> 'text')
30 this is the unique key (or field name/identifier ) for the currentField. Exemple : 'clientName'
31 this is the data array of the current field
32 this is the data array with all fields
33 the uid (Unique ID) of the record containing the current field
34 the class name of the record containing the current field
35 all the data for the record containing the current field
36 field name when processing a microTemplate field (only used when mode=="micro|")
37 sorting index when processing a microTemplate field (only used when mode=="micro|")
50 display the label in front of the field or not
53 display a <div> around the field or not
56 display custom HTML in front of the field
59 display custom HTML in after the field
62 display custom HTML in front of the field
65 display custom HTML in after the field
78 read only record display, no input editing
89 input editing

cli_scripts/colors.php 7

Type Line Description
8 Set up shell colors
36 Returns colored string
40 Check if given foreground color found
44 Check if given background color found
49 Add string and end coloring
55 Returns all foreground color names
60 Returns all background color names

languages/backend_l10n.php 4

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
89 for byte
204 for byte
319 for byte

plugins/mf_searchEngine/modules/searchIndexer.php 12

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
33 breadcrumb
52 check access rights
58 add the plugin to the backend menus
65 breadcrumb
71 default value
136 verifying the record exists in the database
144 update
161 insert
186 $index = new mfSearchIndex();
187 verifying the record exists in the database
219 empty the search index

languages/frontend_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

plugins/mf_searchEngine/ajax-searchEngine-json.php 9

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
25 we are serving json
28 create a backend for being able to use all the mindflow objects
34 print_r($_REQUEST);
36 check the security hash. No request will be honored if the security hash is not supplied or if there is a mismatch
47 process the form
54 traitement des paramètres du formulaire
64 echo "conditions = ".$sqlConditions;
89 echo "Error : No action specified.";

plugins/portfolio/records/portfolioItem.php 5

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
23 table name in the SQL database
44 load translations
45 $this->loadL10n('/mf/plugins/portfolio','records');
130 performance tweak, categories are loaded only once if repetitive calls

plugins/mf_countryData/languages/records/mfCountry_l10n.php 2

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
65 'no_record' => 'Aucun résultat.',

core/csv-exporter.php 19

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
52 we are serving excel csv
57 SQL for collecting all the records that will be exported
60 Class defining the record (optional)
63 keys from the record that won't be exported
66 display or not column names on first row of the export
68 flag in order to figure if column names have already been printed or not
74 here we store our CSV exported lines
80 create an instance of the object type in order to get the record definition
83 query the data to export
101 affichage du nom de la colonne en première ligne
103 on saute les colonnes sans intérêt pour le client
120 on saute les colonnes sans intérêt pour le client
123 cas particuliers
126 processing values featuring a keyProcessor function
128 process key for display with optional user supplied processing function.
131 processing regular keys
183 conversion du charset de la valeur pour excel
184 $line .= ''.iconv("UTF-8", "Windows-1252//TRANSLIT", $value).';';

install/index.php 24

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
27 we are serving HTML
30 force logout from backend as it may raise database errors.
31 session_start();
32 unset($_SESSION['current_be_user']);
33 print_r($_SESSION);
35 create a backend for being able to use all the mindflow objects
45 echo "SESSION=";
46 print_r($_SESSION);
50 check the security hash. No request will be honored if the security hash is not supplied or if there is a mismatch
59 password check
61 login success !
70 user is connected
76 last request was more than 30 minutes ago
77 logout current user
80 update last activity time stamp
82 if the session has not expired, show the install tool menu
149 user is not connected
151 show login form
175 Build the HTML
178 process page header
181 processing UI messages
205 process page footer
210 output HTML

index.php 3

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
23 creation and execution of the frontend render
26 echo "memory=".memory_get_usage();

plugins/mf_users/languages/records/mfUser_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

plugins/siteInfos/languages/modules/siteInfos_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

plugins/events/records/event.php 2

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
22 table name in the SQL database

plugins/siteInfos/languages/siteInfosPlugin_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

plugins/events/languages/eventsPlugin_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

plugins/urlRewriter/index.php 2

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
60 add module

plugins/contacts/defaultPluginConfig.php 5

Type Line Description
3 default configuration for the plugin
4 add and edit these values in your config file
10 'email-template' => $config['website_pluginsdir'].'/contacts/templates/email.html',
12 'contact-class' => $config['website_pluginsdir'].'/contacts/records/contact.php',
14 'contact-class-l10n' => $config['website_pluginsdir'].'/contacts/l10n/contact.php',

plugins/mf_searchEngine/records/mfIndexable.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

plugins/contacts/languages/backendMenus_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

core/formFields/selectField.php 22

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
27 value of the id attribute of the <form> tag this field is included in
28 the mode value allows discriminating between templates (mode=="template|") and microtemplates (mode=="micro|")
29 this is an numeric array of every arguments included in the 'dataType' index of the field. example : $MyField['dataType']='input text' gets available as array(0 => 'input', 1=> 'text')
30 this is the unique key (or field name/identifier ) for the currentField. Exemple : 'clientName'
31 this is the data array of the current field
32 the uid (Unique ID) of the record containing the current field
33 the class name of the record containing the current field
34 all the data for the record containing the current field
35 field name when processing a microTemplate field (only used when mode=="micro|")
36 sorting index when processing a microTemplate field (only used when mode=="micro|")
45 display the label in front of the field or not
48 display a <div> around the field or not
51 display custom HTML in front of the field
54 display custom HTML in after the field
57 display custom HTML in front of the field
60 display custom HTML in after the field
71 read only record display, no input editing
72 seek selected value
92 input editing
118 htmlentities($fieldData['value'], ENT_QUOTES)
119 $fieldData['value']

plugins/siteInfos/languages/records/siteInfo_l10n.php 3

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
34 'no_record' => 'Il n\'existe pas d\'info genérale pour le moment. Vous pouvez <a href="{subdir}/mf/index.php?module=siteInfos&action=create">créer une info générale</a>.',
51 'no_record' => 'There currently exists no general site info. You can <a href="{subdir}/mf/index.php?module=siteInfos&action=create">create a general site info</a>.',

plugins/portfolio/languages/records/portfolioItem_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

plugins/pages/languages/records/page_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

plugins/mf_users/languages/userRights_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

plugins/urlRewriter/languages/urlRewriterPlugin_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

plugins/portfolio/defaultPluginConfig.php 3

Type Line Description
3 default configuration for the plugin
4 add and edit these values in your config file
6 uid of page where a portfolio entry should be displayed

core/formFields/richTextField.php 21

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
27 value of the id attribute of the <form> tag this field is included in
28 the mode value allows discriminating between templates (mode=="template|") and microtemplates (mode=="micro|")
29 this is an numeric array of every arguments included in the 'dataType' index of the field. example : $MyField['dataType']='input text' gets available as array(0 => 'input', 1=> 'text')
30 this is the unique key (or field name/identifier ) for the currentField. Exemple : 'clientName'
31 this is the data array of the current field
32 the uid (Unique ID) of the record containing the current field
33 the class name of the record containing the current field
34 all the data for the record containing the current field
35 field name when processing a microTemplate field (only used when mode=="micro|")
36 sorting index when processing a microTemplate field (only used when mode=="micro|")
50 display the label in front of the field or not
53 display a <div> around the field or not
56 display custom HTML in front of the field
59 display custom HTML in after the field
62 display custom HTML in front of the field
65 display custom HTML in after the field
75 read only record display, no input editing
86 input editing
101 Load the localized interface.
117 transfer CKEditor content back to the textarea tag before transmitting the form

plugins/mf_countryData/records/mfFrance.php 2

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
21 table name in the SQL database

plugins/mf_users/forms/usersForm.php 5

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
22 important declaration, do not remove (would cause bug)
29 columns descriptions, including autogenerated form settings
75 arrondissement::listArrondissementsByUid()
85 quartier::listQuartiersByUid()

plugins/mf_users/index.php 6

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
58 load the translation files
61 inform MindFlow of the new dbRecords supplied by this plugin
65 load template localisation
68 load default plugin
72 define available plugin user rights

plugins/mf_searchEngine/defaultPluginConfig.php 2

Type Line Description
3 default configuration for the plugin
4 add and edit these values in your config file

core/formsManager.php 218

Type Line Description
9 www.apache.org/licenses/LICENSE-2.0
55 List of css files to link in the page
56 Javascript files called in the page header
57 Javascript files called at the end of the page to prevent page loading slowdowns
58 private $microJsList = array(); //Javascript files called when loading microtemplates
59 Javascript code called before saving forms. MUST NOT be be wrapped between <script></script> tags
60 Javascript code called after saving forms. MUST NOT be be wrapped between <script></script> tags
61 some tags such as <fieldset> may be spanned accross multiple tags. This array indicates after which field the tag should be closed and the value of the closing field
63 list of available field types to be displayed in forms
68 adding Mindflow standard field types
69 additional custom field types can be supplied by plugins using the mf->formsManager->addFieldType() function.
138 add custom field types CSS and JS
166 invokes the supplied phpFunction after submiting the form. The function is also invoked if saving the submission fails. The supplied function must have the following profile : myCallbackFunction($status (="success" or = "error"),$formObject); If a value is returned by the function, it will be supplied as a jsondata.phpResult value in the JSON response of the submission. It can then be handled using your own JSCallbackFunctionAfterSubmit javascript function
167 customize the submit button onclick action
168 set to true if you want to show a cancel button
169 customize the save close button label with the given text
170 customize the cancel button onclick action usual values would be 'history.go(-1);' for non ajax forms and 'mf.dialogManager.closeLastDialog();' when the form has been opened using mf.dialogManager.openDialog() method.
206 adds/overloads all the attributes specified into this array to the <form> tag
214 you could set 'action'=>'/my-custom-url.php',
215 'onsubmit'=>'myCustomJSFunction();',
228 process additional form attributes
253 form security variables
266 inserting div for creating/displaying dialogs if not available in the page.
271 document.write("<div id=\"mf_dialogs\"></div>");
305 show tabs if we have more than 1 panel
324 $html[] = '<div class="mfSaveButtons">';
326 cast $showSubmitButton to boolean in case it would have been given as string
377 reset error fields
384 update record list view to integrate the current record data changes to the list
394 submit failure, erroneous fields
399 reset error fields
471 * @param $phpPageOnClose under certain circumstances, such as when calling ediBackend() from an AJAX script, we may loose the value of the orginal PHP script for the module, which is called when closing the form for returning to the module main page.
489 invokes the supplied JS function after saving the record. The function is also invoked if saving the record fails. The supplied function must have the following profile : myCallbackFunction(status (="success" or = "error"),jsonData);
490 invokes the supplied phpFunction after saving the record. The function is also invoked if saving the record fails. The supplied function must have the following profile : myCallbackFunction($status (="success" or = "error"),$recordClassName,$recordUid); If a value is returned by the function, it will be supplied as a jsondata.phpResult value in the JSON response of the submission. It can then be handled using your own JSCallbackFunctionAfterSubmit javascript function
491 customize the save button label with the given text
492 customize the save close button label with the given text
493 customize the preview button label with the given text
494 customize the close button label with the given text
495 not only the save buttons will not be shown, but the form saving javascript code won't be output, making it impossible to trick the form saving process
496 disable editing for all fields of the record with this simple flag
497 forces re-evaluating and displaying the form throught AJAX feedback once the record is saved. Useful if some value affects the form aspect.
502 adds/overloads all the attributes specified into this array to the <form> tag
505 you could set 'action'=>'/my-custom-url.php',
506 'onsubmit'=>'myCustomJSFunction();',
535 The flag set inside the record takes priority if set to true
540 disable data editing for every record is noEdit is true
546 process additional form attributes
550 fix value. concatenation cannot be done in function defaut parameter setup
554 set autocomplete = off by default in backend because it interferes with typeahead popups and is hard to circumvent
555 also autcomplete is rarely required in backends
582 form security variables
592 form security variables
603 inserting div for creating/displaying dialogs if not available in the page.
608 document.write("<div id=\"mf_dialogs\"></div>");
611 var lastEditedUid="";
615 action="'.$_SERVER['PHP_SELF'].'" id="'.$formID.'" method="POST" role="form" class="form-horizontal">';
646 show tabs if we have more than 1 panel
650 do not show tab if $tab_id==''. This is intended for displaying some data more freely prior tabbed data.
699 url for previewing this class of record
700 $previewUrl = (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$record->getPreviewUrl() : "http://".$_SERVER['SERVER_NAME'].$record->getPreviewUrl();
701 print_r($record->data['uid']);
722 if saving only some fields, put those field names in the form
760 reset error fields if they had been set previously
767 forces the update of the form in the page using form data sent back through AJAX. Applies only if $advancedSettings['reloadFormOnSave'] == true
770 save open tab id to restore the opened tab after updating the form
773 hide content while reloading
777 remove scripts that came along with the form
780 substitute the form data and update the formID with the one of the updated form
783 restore the opened tab after updating the form, if there are tabs displayed
786 we need to adapt the tab id to new form uid. It is not so simple to manage multiple forms in a single window !
798 update the record uid in the form. This prevents duplicates when a new record is saved twice
802 set edited option index, needed if editing a recordSelectField
805 force evaluating javascript (always disabled after AJAX call for security reasons)
810 show content after reloading
814 regular case
817 update the record uid in the form. This prevents duplicates when a new record is saved twice
820 set edited option index, needed if editing a recordSelectField
826 show form update status message
838 update record list view to integrate the current record data changes to the list
851 show form update status message
857 form security variables
872 display the edit form
889 execute optional callback function
893 submit failure, erroneous fields
898 reset error fields
929 if saving only some fields, empty field saveThoseFields after save
934 end saveForm_'.$formID;
938 form security variables
962 request to cleanup record if it is in temporary state (never saved by direct user action, only saved for technical coherency)
970 update record list view to integrate the current record data changes to the list
1016 load the microtemplate
1021 load microtemplate data from existing record if one is already set
1022 merge it with the the microtemplate datastructure definition loaded from file in case the definition has evolved so we can reflect changes
1026 initialize the microtemplate data from the microtemplate datastructure definition loaded from file
1032 build the form
1036 form security variables
1071 show tabs if we have more than 1 panel
1105 transfer CKEditor content back to the textarea tag before transmitting the form
1132 Delete CKEditor instances from the microtemplate form to avoid bugs. It will be recreated on the form refresh if necessary.
1133 This avoid bugs when different microtemplates feature same key name for fields.
1172 show tabs if we have more than 1 panel
1176 if $tab_id == '', display content without tab. This is intended for displaying some data more freely prior tabbed data
1201 show tabs if we have more than 1 panel
1205 creating tabbed panel
1207 now build fields in each panel
1220 add custom postFormHTML() code from object class
1251 store temporarily the HTML of each field in an array indexed by the field key
1252 this array will then be sorted in the order specified by $keysOfDatasInTab (that is the value $this->showInEditForm['tabName'] in our object definition)
1253 this array will then be added to $html
1258 processing each data entry for display
1265 HTML code for current field
1268 retreive row class and attributes customization for field
1278 dbRecord::$dummyFieldTypes
1283 NEW STYLE form field types
1285 Defining the function arguments into an object avoids redefining all existing functions when an argument is added.
1286 It is also easier to use when invoking the displayField function using eval().
1287 this stdClass object contains all the field info. Defining the function arguments into an object avoids redefining all existing functions already issued when a new argument requires to be added to the calls.
1288 value of the id attribute of the <form> tag this field is included in
1289 the mode value allows discriminating between templates (mode=="template|") and microtemplates (mode=="micro|")
1290 this is an numeric array of every arguments included in the 'dataType' index of the field. example : $MyField['dataType']='input text' gets available as array(0 => 'input', 1=> 'text')
1291 this is the unique key (or field name/identifier ) for the currentField. Exemple : 'clientName'
1292 the class name of the record containing the current field
1293 the uid (Unique ID) of the record containing the current field
1294 this is the data array of the current field
1295 this is the data array of all fields
1296 all the data for the record containing the current field
1297 field name when processing a microTemplate field (only used when mode=="micro|")
1298 sorting index when processing a microTemplate field (only used when mode=="micro|")
1300 display the field
1304 close field div tag
1314 $mf->addErrorMessage(nl2br(trim(preg_replace('/[ ]{2,}|[\t]/', '&nbsp;&nbsp;&nbsp;&nbsp;',print_r($f->fieldsData,true)))));
1321 now add our fields HTML code in the order defined in $keysOfDatasInTab
1322 print_r($allFieldsHtml);
1324 $docHtml[] = $key." ".$value."<br />";
1367 displaying label for data's field
1420 stores unvalid fields
1426 create an instance of the record class
1427 TODO FIX SECURITY BREACH BELOW AND SEARCH FOR SIMILAR BREACHES IN MF CODE
1430 load the record's existing data in it if it is an existing record
1435 check the selected template name and initialize the data structure inside 'template_content' with the data structure of this template
1437 && ($record->data['template_name']['value'] != $_REQUEST['record|template_name'])
1438 Always update the data structure in order to make sure it is up to date (in case the template definition has been modified manually)
1440 save the existing 'template_content' data of the current record so we don't overwrite it while setting the new data structure
1443 check the selected template name and initialize the data structure inside 'template_content' with the data structure of this template
1446 then merge back the saved existing data in the updated data structure
1452 store all the submited values into a record that is not saved for now
1455 validate the submited values
1460 if we have a composite parameter name, such as record_something or template_something
1463 echo $keyComp[1].chr(10);
1469 check field validity
1473 check value using supplied filter function
1485 pass value thrue checking function
1497 echo "filterfunc valid=".$valid;
1499 if returned value is simply 'false'
1501 reject value and apply standard error message from the l10n file
1504 in case a string is returned instead of 'true' or 'false', we have a custom error message
1510 check value using supplied list of forbidden values
1514 reject value
1526 check value against minimum entry count
1545 check value against maximum entry count
1569 check field validity
1575 reject value
1584 TODO : Check if fields are correctly verified in templates ?
1586 print_r($record->data['template_content']['value']);
1588 $record->data['template_content']['value'] = array_merge_recursive_distinct($mf->templates[$currentTemplateName]['template_data'],record->data['template_content']['value']);
1591 process the value with the specified record processing function from the class
1605 common case
1608 Fix
1621 make a list of erroneous keys by tab
1629 for each erroneous field
1631 check within each tab against the list of keys displayed
1634 when saving only certain fields, do not show errors for other fields aside tab names
1674 create an instance of the record class
1677 load the record's existing data in it if it is an existing record
1682 requires AUTOLOAD of all classes
1683 retreive the record / form object being processed from the session
1692 check the selected template name and initialize the data structure inside 'template_content' with the data structure of this template
1694 && ($record->data['template_name']['value'] != $_REQUEST['record|template_name'])
1695 Always update the data structure in order to make sure it is up to date (in case the template definition has been modified manually)
1697 save the existing 'template_content' data of the current record so we don't overwrite it while setting the new data structure
1700 check the selected template name and initialize the data structure inside 'template_content' with the data structure of this template
1703 then merge back the saved existing data in the updated data structure
1708 update record's data
1714 if we have a composite parameter name, such as record_something or template_something
1719 security fix : ignore and do not process keys submited but not defined in the record data array
1725 process the value with the specified record processing function from the class
1729 echo '$processedValue = $record->'.$function[1].'("'.$value.'","'.$record->data[$keyComp[1]]['value'].'");';
1732 echo '$processedValue = $record->'.$function[1].'("'.$value1.'","'.$value2.'");';
1743 common case
1749 run formFields onSave() methods
1757 echo "processing key = ".$keyComp[1]." \n\r";
1758 security fix : ignore and do not process keys submited but not defined in the record data array
1760 process the value with the specified record processing function from the class
1767 common case
1781 verify unchecked checkboxes or radio buttons which are not transmitted with the form
1783 check for key presence in the form
1786 key is displayed
1789 if the field name was not found in the request, then the checkbox or radio is not checked
1797 verify unchecked checkboxes or radio buttons which are not transmitted with the form for template data
1801 echo "t1=".isset($record->data['template_content']['value']).'\n';
1804 check for key presence in the form
1806 key is displayed
1808 echo "isset(\$_REQUEST['template|'.$key])=".isset($_REQUEST['template|'.$key]);
1810 if the field name was not found in the request, then the checkbox or radio is not checked
1820 print_r($record);
1856 attributes for input field
1870 $key;
1873 attributes for input field
1886 utility function to recursively merge two arrays with overwrites.
1892 only merge the data value so the datatype from the template is preserved and modifications of the datatype can be reflected
1910 return (checkSec());
1930 Warning : never echo $secString in a public web page, as it will reveal your salt
1932 $debugArray=array();
1937 $debugArray[$key] = $_REQUEST[$key];
1962 Warning : never echo $secString in a public web page, as it will reveal your salt
1969 echo " make=".print_r($lockedKeys,true).'<br />'.chr(10);
1970 echo " make=".$secString.'<br />'.chr(10);
1971 echo " make returns =".hash('sha256',$secString).'<br />'.chr(10);

plugins/welcome/modules/welcome.php 2

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
36 echo 'right='.$this->userGroup->getUserRight('welcome','welcomeStartPage');

core/l10nManager.php 20

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
32 storage for localized labels
35 base mindflow labels
40 database labels
44 backend labels
48 initialize storage for templates labels
70 if($locale=='de')//print_r($GLOBALS['l10n_text'][$domain][$locale]);
93 $mf->addWarningMessage($l10n->getLabel('backend','domain_warning1').' "'.$domain.'" '.$l10n->getLabel('backend','domain_warning2').'<br /><br />'.$backtrace);
124 set default locale
170 echo $languageFilePath." test=".is_file(DOC_ROOT.SUB_DIR.$languageFilePath)."<br />";
172 load the current record's translation files
178 else $mf->addErrorMessage('l10nManager::loadL10nFile( "'.$domain.'", "'.$languageFilePath.'" ) : '.$mf->l10n->getLabel('backend','file_not_found').' !');
181 return '';
182 echo 'l10nManager::loadL10nFile( "'.$domain.'", "'.$languageFilePath.'" ) : '.$mf->l10n->getLabel('backend','file_not_found').' !<br />'.chr(10);
195 load l10n text for inherited record types
198 make sure we do not load twice an l10n file : ignore it if already defined
201 make sure base class dbRecord l10n text is loaded for any record type
207 preload dbRecord labels
210 then add user defined labels
223 addTemplatesL10n

install/update_scripts/1.9/creator.php 5

Type Line Description
9 www.apache.org/licenses/LICENSE-2.0
76 save current locale
79 alter table for each locale
81 switch the locale
87 restore current locale

plugins/mf_countryData/records/mfColissimoFees.php 4

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
21 table name in the SQL database
108 Get the Colissimo area first
125 Get the Colissimo fee

plugins/siteInfos/index.php 3

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
60 load the translation files
63 inform MindFlow of the new dbRecords supplied by this plugin

core/tinymce_session_auth.php 12

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
21 require_once DOC_ROOT.SUB_DIR.'/mf/core/records/mfUser.php';
25 create a backend for being able to use all the mindflow objects
29 $l10n = $mf->l10n;
31 echo("locale=".$_SESSION['current_be_user']->data['backend_locale']."<br />");
32 echoValue('locale',$mf->getLocale());
33 print_r($_SESSION);
40 make sure the files dir exists and create it if not available
46 $_SESSION['current_be_user']->data['backend_locale'];
47 $_SESSION['current_be_user']->data['backend_locale'];
49 Redirect
50 ".$_SERVER['SERVER_NAME'].$_REQUEST['return_url'] : "http://".$_SERVER['SERVER_NAME'].$_REQUEST['return_url'];

plugins/rid/index.php 9

Type Line Description
44 load the translation files
48 inform MindFlow of the new dbRecords supplied by this plugin
49 [load_record_rid]
51 [/load_record_rid]
52 {index_load_record}
55 load modules
56 {index_load_module}
59 add editing rights
60 {index_add_module_editing_right}

plugins/pages/languages/userRights_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

plugins/mf_searchEngine/languages/mfSearchEnginePlugin_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

core/formFields/microtemplateField.php 32

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
27 value of the id attribute of the <form> tag this field is included in
28 the mode value allows discriminating between templates (mode=="template|") and microtemplates (mode=="micro|")
29 this is an numeric array of every arguments included in the 'dataType' index of the field. example : $MyField['dataType']='input text' gets available as array(0 => 'input', 1=> 'text')
30 this is the unique key (or field name/identifier ) for the currentField. Exemple : 'clientName'
31 this is the data array of the current field
32 the uid (Unique ID) of the record containing the current field
33 the class name of the record containing the current field
34 all the data for the record containing the current field
35 field name when processing a microTemplate field (only used when mode=="micro|")
36 sorting index when processing a microTemplate field (only used when mode=="micro|")
46 display the label in front of the field or not
49 display a <div> around the field or not
52 display custom HTML in front of the field
55 display custom HTML in after the field
58 display custom HTML in front of the field
61 display custom HTML in after the field
73 read only record display, no input editing
84 input editing
128 form security variables
183 form security variables
207 submit the file name and update the record in the database
211 console.log(jsonData);
237 form security variables
246 microtemplate functions
263 actions to be performed when the window is closed
273 microtemplate functions
284 display the edit form
291 show: { effect: "fadeIn", duration: 500 }
317 show: { effect: "fadeIn", duration: 500 }
334 form security variables
346 delete the <li> entry of the page from the DOM on success

core/ajax-core-json.php 179

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
31 we are serving json
35 create a backend for being able to use all the mindflow objects
39 create a backend for being able to use all the mindflow objects
50 check the security hash. No request will be honored if the security hash is not supplied or if there is a mismatch
57 cloning an existing record
65 now load our record with correct sorting specified
74 copy selected options from a multiple select (formsManager->makeRecordSelectField())
89 paste selected options from a multiple select (formsManager->makeRecordSelectField())
98 retreive clipboard data from session
111 $dataType = explode(' ',trim($record->data[$recordKey]['dataType']));
112 $targetLinkedRecordClassName = (isset($dataType[1]))?$dataType[1]:'';
126 eval('$newOption'.$optionUid.'->data[\'creator_uid\'][\'value\'] = $mf->currentUser->data[\'uid\'][\'value\'];');
127 eval('$newOption'.$optionUid.'->data[\'creator_class\'][\'value\'] = get_class($mf->currentUser);');
143 echo '{"jsonrpc" : "2.0", "result" : "success", pasted_class: '.json_encode($optionClass).'}';
153 sorting with dbRecord showEditTable
162 first make sure sorting is consistent in the table : renumerate every entry
181 now load our record with correct sorting specified
184 then update the record immediatly above and decrement its sorting
195 increment ou record's sorting
202 then update the record immediatly below and increment its sorting
213 increment ou record's sorting
222 sorting with jQuery sortable
225 find the list of sorted records
235 create an instance of the object to be updated
237 load its content
241 the field is not located inside a template data structure, but straight in the record
242 simply update the requested field
248 search each item ID in the transmited array and move the file values accordingly
249 thank you jQuery for having us do such complicate things because it can not transmit a filename using sortable()
262 the field is located inside a template data structure
263 update the field inside the template_content field
269 search each item ID in the transmited array and move the file values accordingly
270 thank you jQuery for having us do such complicate things because it can not transmit a filename using sortable()
282 save the updated record
293 sorting with jQuery sortable
296 find the list of sorted records
306 create an instance of the object to be updated
308 load its content
312 the field is not located inside a template data structure, but straight in the record
313 simply update the requested field
316 mf < 1.4 data conversion
323 search each item ID in the transmited array and move the file values accordingly
324 thank you jQuery for having us do such complicate things because it can not transmit a filename using sortable()
337 the field is located inside a template data structure
338 update the field inside the template_content field
341 mf < 1.4 data conversion
348 search each item ID in the transmited array and move the file values accordingly
349 thank you jQuery for having us do such complicate things because it can not transmit a filename using sortable()
362 save the updated record
373 updating parent->child relationships
376 update page parent
388 update the page tree so we can read up-to-date information on page structure
391 now updating sorting
392 poor performance (updates all records in the tree while only one has moved)
393 but easyest way to do due to poor info collected from the $pages data supplied
405 class in which the microtemplate is located
406 record instance unique id
407 microtemplate key identifier
408 list of the indexes supplied in the new order by sortable
410 load existing values
418 reordering microtemplates
434 create an instance of the object to be updated
437 load its content
469 create an instance of the object to be updated
472 load its content
475 delete the record
504 echo('$option'.$optionUid.' = new '.$optionClass.'();');
506 echo('$option'.$optionUid.'->load('.$optionUid.');');
508 echo('$option'.$optionUid.'->delete();');
515 retreive all active options data and return them as an additional info, so the javascript callback functions have direct access to the content of all the options listed.
531 create an instance of the object to be updated
534 load its content
536 delete the record
547 typeahead search in recordSelectField
549 Typeahead autocompletion
579 create an instance of the object to be updated
582 load its content
584 ".$_SERVER['SERVER_NAME'].$record->getPreviewUrl() : "http://".$_SERVER['SERVER_NAME'].$record->getPreviewUrl();
597 create an instance of the object to be updated
600 load its content
602 update the record
620 create an instance of the object to be updated
622 create the record
635 create an instance of the object to be updated
639 when closing a record that has been stored automatically for technical reasons, but has never been saved by the user, mark the record as deleted
650 saves a record in AJAX from a formsManager form, but processes only the fields specified in $_REQUEST['saveThoseFields'] (comma separated list of field names)
651 other fields are ignored and the form is saved, even if some fields not specified in the saveThoseFields list are not valid (defaut values for those field should match the SQL table definition constraints though, otherwise the database will not accept to save the record).
664 filter field errors if saving only the field list specified in $_REQUEST['saveThoseFields']
675 if the record has no uid yet and we have a partial save, create a temporary record with data['deleted']['value']=2
679 keep temporary state if a new partial save occurs and the record is already in temporary state
683 switch to active state in other cases
684 otherwise, set the record to active state, if not deleted
687 create / save the record
690 print_r($record);
694 update the record's form
717 call the PHP callback function
721 re-generate the form if $reloadFormOnSave == true
728 update form security variables
738 return values as JSON
752 call the PHP callback function
756 some fields are not valid
765 Handles form processing. Detects erroneous fields. The generated form object can be obtained in a custom phpFunction specified in the parameter $advancedSettings['PHPCallbackFunctionAfterSubmit'] specified when calling formsManager->editForm
769 on reprend le code de saveRecord
779 filter field errors if saving only the field list specified in $_REQUEST['saveThoseFields']
790 no form processing occurs here. It is done in the formsManager checkAndProcessForm() and processform() functions.
811 on traite notre formulaire et on crée notre dossier
820 'titreForm', 'ref_circuit_form','dates','','uid_depart_form','uid_resa','formButtons'
829 update form security variables
836 call the PHP callback function
841 $response = '{"jsonrpc" : "2.0", "result" : "form submission success", "action_status" : "ok", "class" : "'.get_class($form).'", "message" : '.json_encode('<div class="alert alert-success fade in"><button type="button" class="close" data-dismiss="alert">×</button>'.$l10n->getLabel('backend','object-save-success').'</div>').((isset($phpResult))?', "phpResult" : '.json_encode($phpResult):'').((($reloadFormOnSave))?', "form" : '.json_encode($formHTML):'').', "saveRecordHash" : "'.$secHash.'", "saveRecordFields" : "'.$secFields.'"}';
850 call the PHP callback function
854 some fields are not valid
864 loads a record's editing form
874 load its content
877 update the record's form
900 call the PHP callback function
908 update form security variables
918 return values as JSON
922 some fields are not valid
932 changes the backend language
939 create the record
951 create an instance of the object to be updated
954 load its content
956 update the record
958 get the microtemplate slot
959 echo $_REQUEST['micro_key'];
960 print_r($record->data['template_content']['value'][$_REQUEST['micro_key']]);
964 add the new microtemplate
981 create an instance of the object to be updated
984 load its content
986 update the record
988 get the microtemplate slot
992 delete the new microtemplate
1009 create an instance of the object to be updated
1012 prepare edition form
1023 create an instance of the object to be updated
1026 load its content
1033 update the record's values
1038 print_r($microtemplateData);
1046 echo "***".chr(10).chr(10);
1047 print_r($microtemplateData);
1071 create an instance of the object to be updated
1131 $fullTitle .= $option->data[trim($title)]['value'].' ';
1134 $text = $option->data[$titleFields]['value'];
1155 if(get_parent_class($record)=="dbRecord") {
1160 retreive all active options data and return them as an additional info, so the javascript callback functions have direct access to the content of all the options listed.
1179 create an instance of the object to be updated
1181 load its content
1185 the field is not located inside a template data structure, but straight in the record
1186 simply update the requested field
1192 the field is located inside a template data structure
1193 update the field inside the template_content field
1198 the field is located inside a template data structure
1199 update the field inside the template_content field
1207 save the updated record
1210 update record with uploaded file
1211 echo "success ".$_REQUEST['file'];
1221 create an instance of the object to be updated
1223 load its content
1227 the field is not located inside a template data structure, but straight in the record
1228 simply update the requested field
1231 Mindflow < 1.4 compatibility
1234 regular case
1239 remove the file from the array
1250 the field is located inside a template data structure
1251 update the field inside the template_content field
1254 Mindflow < 1.4 compatibility
1257 regular case
1262 remove the file from the array
1272 the field is located inside a template data structure
1273 update the field inside the template_content field
1279 Mindflow < 1.4 compatibility
1282 regular case
1287 remove the file from the array
1302 scan the directory for the original file and eventually its resized instances
1321 update the record in all cases
1333 echo "Error : No action specified.";
1339 echo "Error : Invalid securityToken supplied.";

core/utils.php 121

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
33 $tableHeader = '';
41 array_keys($value)
105 etc_hosts_alix_axel_likes_beer.jpg
113 normalizes (romanization) accented chars
147 Convert accented characters, and remove parentheses and apostrophes
151 Do the replacements, and convert all other non-alphanumeric characters to spaces
154 Remove a - at the beginning or end and make lowercase
165 echo "url=".$url.chr(10);
166 )?";
183 echo "r=".$r.chr(10);
193 echo "count(\$match)=".count ($match).chr(10);
206 print_r($parts);
217 or https:// , matching the protocol used to load the current page
220 " : "http://");
225 or https://
250 , ftps://, http:// and https:// in a case insensitive way and adds http:// prefix to the URL if missing
256 ~i", $url)) {
259 " . $url;
265 , ftps://, http:// and https:// in a case insensitive way and adds 'http://'.$_SERVER['SERVER_NAME'] prefix to the URL if missing
271 ~i", $url)) {
275 " .$_SERVER['SERVER_NAME'].$url;
371 $GLOBALS['func_start'] = microtime(true);
374 absolute path from the DOCUMENT ROOT
376 relative path from the uploads directory
383 retreive already computed original image dimensions from the file array if available
388 else compute original image dimensions
392 if the resized image already exists in the filesystem
395 if the original image dimensions are available
396 compute the resized image from existing dimension instead of using function getimagesize() which is a performance killer
397 and return the resized info without processing the image
409 Resized image does not exist in the filesystem
412 if original image dimensions are already in bounds regarding the resized maximums, do nothing
419 generate a resized image
435 $execTime = round (microtime(true) - $GLOBALS['func_start'],4);
436 if(!isset($GLOBALS['exec_total']))$GLOBALS['exec_total']=0;
437 $GLOBALS['exec_total'] += $execTime;
444 compute resizing ratios
449 ratios are different, we need to crop to preserve image aspect
451 crop vertically
454 find topMost and bottomMost pixels of cropped image
471 crop horizontally
474 find topMost and bottomMost pixels of cropped image
514 throw new RuntimeException('No image set');
617 using maxHeight limit, if the computed width remains wider than max_width, limit image size by the width
630 using maxWidth limit, if the computed height remains taller than max_height, limit image size by the height
657 '30/11/-0001'
658 $date = str_replace( '.', '/', $date);
661 else return '0000-00-00';
664 else return '0000-00-00';
668 '30/11/-0001 00:00:00'
671 else return '0000-00-00 00:00:00';
677 '30/11/-0001 00:00:00'
680 else return '0000-00-00 00:00:00.000000';
683 else return '0000-00-00 00:00:00.000000';
723 FORM VALIDATION UTILS
763 Try a select statement against the table
764 Run it in try/catch in case PDO is in ERRMODE_EXCEPTION.
768 We got an exception == table not found
772 Result is either boolean FALSE (no table found) or PDOStatement Object (table found)
826 Recrusive
829 If type is object, try to get properties by Reflection.
837 Cache the data
869 If type is array, just retun it's value.
876 Start dumping datas
879 Start recrusive print
886 Increment level
892 Decrement level
905 Clean cache
912 End function
917 Generates a strong password of N length containing at least one lower case letter,
918 one uppercase letter, one digit, and one special character. The remaining characters
919 in the password are chosen at random from those four sets.
920
921 The available characters in each set are user friendly - there are no ambiguous
922 characters such as i, l, 1, o, 0, etc. This, coupled with the $add_dashes option,
923 makes it much easier for users to manually type or speak their passwords.
924
925 Note: the $add_dashes option will increase the length of the password by
926 floor(sqrt(N)) characters.
981 if the plain text is shorter than the maximum length, return the whole text
985 splits all html-tags to scanable lines
991 if there is any html-tag in this line, handle it and add it (uncounted) to the output
993 if it's an "empty element" with or without xhtml-conform closing slash
995 do nothing
996 if tag is a closing tag
998 delete tag from $open_tags list
1003 if tag is an opening tag
1005 add tag to the beginning of $open_tags list
1008 add html-tag to $truncate'd text
1011 calculate the length of the plain text part of the line; handle entities as one character
1014 the number of characters which are left
1017 search for html entities
1019 calculate the real length of all entities in the legal range
1025 no more characters left
1031 maximum lenght is reached, so get off the loop
1037 if the maximum length is reached, get off the loop
1049 if the words shouldn't be cut in the middle...
1051 ...search the last occurance of a space...
1054 ...and cut the text in this position
1058 add the defined ending to the text
1061 close all unclosed html-tags
1082 form security variables
1089 The following fields are only being checked if passed as arguments in this function call.
1090 They may be altered using javascript by the developper (obviously in this case, those fields are no longer secured)
1113 form security variables
1117 $secHash = formsManager::makeSecValue($secKeys);
1118 $secFields = implode(',',array_keys($secKeys));
1201 aidanlister.com/2004/04/recursively-copying-directories-in-php/
1208 Check for symlinks
1213 Simple copy for a file
1218 Make destination directory
1223 Loop through the folder
1226 Skip pointers
1231 Deep copy directories
1235 Clean up
1251 reverse array to make steps line up chronologically
1252 $trace = array_reverse($trace);
1253 remove {main}
1254 remove call to this method
1260 replace '#someNum' with '$i)', set the right ordering

backend/templates/mf-default/css/backend.css.php 7

Type Line Description
4 header('HTTP/1.0 304 Not Modified');
5 header('Cache-Control: max-age=3600, must-revalidate');
14 echo "\$bgExtPart=".$bgExtPart.chr(10);
15 echo "\$strlen($bgExtPart)=".strlen($bgExtPart).chr(10);
16 echo "test=".(strlen($bgExtPart)==0).chr(10);
23 echo "\$bgIsDir=".$bgIsDir;
26 fonts.googleapis.com/css?family=Oswald|Archivo+Narrow);

core/forms/installToolLoginForm.php 4

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
28 important declaration, do not remove (would cause bug)
30 source database for records migration
31 target / local database for records migration

core/formFields/recordSelectField.php 102

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
37 value of the id attribute of the <form> tag this field is included in
38 the mode value allows discriminating between templates (mode=="template|") and microtemplates (mode=="micro|")
39 this is an numeric array of every arguments included in the 'dataType' index of the field. example : $MyField['dataType']='input text' gets available as array(0 => 'input', 1=> 'text')
40 this is the unique key (or field name/identifier ) for the currentField. Exemple : 'clientName'
41 this is the data array of the current field
42 the uid (Unique ID) of the record containing the current field
43 the class name of the record containing the current field
44 all the data for the record containing the current field
45 field name when processing a microTemplate field (only used when mode=="micro|")
46 sorting index when processing a microTemplate field (only used when mode=="micro|")
54 list of multiselect instances with option saveAll enabled
64 $pdo = $mf->db->pdo;
66 create an instance of our record so we are sure its l10n file is loaded (often it is not).
70 $dataType = $f->fieldData['dataType'];
74 display the label in front of the field or not
77 display a <div> around the field or not
80 display custom HTML in front of the field
83 display custom HTML in after the field
86 display custom HTML in front of the field
89 display custom HTML in after the field
93 Add icon before label
136 '.(($icon != '')?'<td class="multiselect-col"><span class="input-group-addon">'.$icon.'</span></td>':'').'
140 SELECT Field generation
155 Now get the list + data of the selected records displayed in this field
158 and process them for display
171 extract and process the content of each <option> using optional keyProcessors
187 If the records are allowed to be edited by someone else than their creator, $allowCrossEditing = true
190 build the <options> tag attributes
193 get the current logged in user
201 allow editing if cross editing is enabled or if the current user is the creator of the record
246 component ID selector generation
250 enable saveAll mode if in addItems mode
256 restore value from record data if no value has been saved in javascript (first form display case).
260 stores the current select ID so it can be processed so it has all its items saved on form submission
261 this is for savemode = "saveAll" which is the default behavior
262 do not store again value on form refresh (inArray test to check if value already exists)
274 grey in / grey out editing icons according to the editing status of the option
345 reset editedIndex state to none
347 check if the record has an uid, if not ask to save it, then create the linked record
377 check if the record has an uid, if not ask to save it, then create the linked record
387 open the edit record dialog
388 callback updateOption_xyz() function when closing the record editing window
414 build secured JSON function arguments to give to the JS client in case it requires a detailed access to detailed data of the recordSelect options defined
429 when an option has been created or edited, updates its content into the select box.
448 update existing option in the select box
452 create new option in the select box
456 we need to save this keys value in the parent record first so the options list is accurate if the client calls listRecordSelectItemsData
457 $("#record\\\\|' . $f->key . '").closest("form").attr("id");
484 record deletion
489 .'<div class="deleteStatus"><span id="deleteStatus_'.$f->key.'"></span></div>'
491 build delete request secure arguments
503 build secured JSON function arguments to give to the JS client in case it requires a detailed access to detailed data of the recordSelect options defined
553 cut records from display
558 display count of records deleted
578 AJAX request for searching in the record table some items to be added to the recordSelectField
585 look for the tablewe are working on
588 form security variables
613 searchBox_'.$f->key.'.closest("form").attr("id");';
619 see http://tatiyants.com/how-to-use-json-objects-with-twitter-bootstrap-typeahead/
652 reset entries at each feedback in order to avoid duplicates
692 console.log("selected="+foundRecordUid+","+item);
705 open searchbox on click
721 close searchbox on focus lost
755 $html[] = $wrapBefore.'<a onclick="window.open(\''.$actionLink.'\', \'addActionWindow_'.$f->key.'\',\'height=640,width=640,location=no,menubar=no,resizable=yes,status=no,titlebar=no,toolbar=no,scrollbars=yes\')";" title="'.$l10n->getLabel('backend','add_entry').'">'.$iconAdd.'</a>'.$wrapAfter;
761 reset editedIndex state to none
762 check if the record has an uid, if not ask to save it, then create the linked record
777 record removal
805 $html[] = '<div class="clipboardStatus"><span id="clipboardStatus_'.$f->key.'"></span></div>';
847 display count of records copied
865 build secured JSON function arguments to give to the JS client in case it requires a detailed access to detailed data of the recordSelect options defined
894 build and add the new options to the recordSelect
898 create new option in the select box
903 notify record select JS callback function if registered in "onRefresh" key of the recordSelect definition
906 display count of records pasted
920 record sorting
984 error message display
998 save selections, then select all options so they are all saved
1001 save the component selection
1005 then select every option so they are all saved in the field value
1006 selection will then be restored after the form submission
1013 multiSelect with saveAll enabled : restore selections after form refresh
1016 restore the component selection
1022 Jquery serialize won't POST the select variable if the field is empty.
1023 We need the field to be sent for controlling the min_entries setting of validation if the field is empty
1024 This is a fix for jQuery behavior
1034 Can add propHook for "elements" to filter or add form elements
1040 Use .is(":disabled") so that fieldset[disabled] works
1088 debug_print_backtrace();
1098 if 'initItemsSQL' is defined, populate items list to be displayed on load
1129 preparing request only once
1134 echo "debugSQL key=".$key." SQL=".$sql;
1159 $titles = explode(',',$titleFields);
1162 $fullTitle='';
1166 we need to use the load() method of the records, otherwise some data may not be properly loaded, such as dates not converted from SQL etc..
1175 if 'addItemsSQL' is defined but not 'initItemsSQL', populate items list with only the selected records
1177 echo("getSelectItems 2");
1213 cleanup rogue records which have previously been created and remain in the database, but were not connected to the main record when it has not been saved
1231 preparing request only once
1236 echo "debugSQL key=".$key." SQL=".$sql;
1265 we need to use the load() method of the records, otherwise some data may not be properly loaded, such as dates not converted from SQL etc..
1290 convert '' to 0 for strict SQL compliance

plugins/events/index.php 4

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
61 load the translation files
64 inform MindFlow of the new dbRecords supplied by this plugin
67 add modules

languages/main_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

plugins/mf_countryData/languages/forms/franceFilter_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

core/formFields/templateDataField.php 27

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
28 value of the id attribute of the <form> tag this field is included in
29 the mode value allows discriminating between templates (mode=="template|") and microtemplates (mode=="micro|")
30 this is an numeric array of every arguments included in the 'dataType' index of the field. example : $MyField['dataType']='input text' gets available as array(0 => 'input', 1=> 'text')
31 this is the unique key (or field name/identifier ) for the currentField. Exemple : 'clientName'
32 this is the data array of the current field
33 this is the data array of all fields
34 the uid (Unique ID) of the record containing the current field
35 the class name of the record containing the current field
36 all the data for the record containing the current field
37 field name when processing a microTemplate field (only used when mode=="micro|")
38 sorting index when processing a microTemplate field (only used when mode=="micro|")
46 get the structure from template, in case it has evolved
49 create an instance of the object to display in order to retreive its default values
52 make sure we don't raise an error if $fieldData['value'] is not properly initialized
60 if no template data is defined
61 inject fields definitions of the first template available ($templateKeys[0]) by default
62 $record_model->data['template_content']['value'] = $mf->templates[$templateKeys[0]]['template_data'];
72 get the list of fields to be displayed in the edit form
73 get rid of nasty spaces
76 when creating a new record, there is no value defined so just push the template's definition
77 including its default values
82 when displaying an existing record
84 get the list of fields to be displayed in the edit form for the current template
89 merge with the latest known template definition (in case the definition has changed, it updates the fields)
92 get rid of nasty spaces
95 get the data from the given record and display

plugins/mf_searchEngine/modules/manageSearchIndex.php 13

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0
31 breadcrumb
45 check access rights
51 $mf->pluginManager->addEntryToBackendMenu('<a href="{subdir}/mf/index.php?module=manageSearchIndex"><span class="glyphicon glyphicon-menu glyphicon-search" aria-hidden="true"></span>'.$l10n->getLabel('manageSearchIndex','menu_title').'</a>','datas').'</a>';
55 breadcrumb
56 $this->subModuleName = "<span class=\"glyphicon glyphicon-menu glyphicon-search\" aria-hidden=\"true\"></span>".$l10n->getLabel('manageSearchIndex','menu_title');
70 case edit requested by some module as a GET url parameter
78 case edit requested by some module as a GET url parameter
95 composition du filtre d'affichage
148 count entries in the index
161 invalid db host address exception
177 {subdir}/mf/index.php?module=searchIndexer&submodule=manageSearchIndex&action=create'
178 $buttons = '<button class="btn-sm btn-primary mf-btn-new" type="button" onClick="openRecord(\'{subdir}/mf/core/ajax-core-html.php?action=createRecord&record_class=searchIndex&header=0&footer=0&sec='.$secHash.'&fields='.$secFields.'&ajax=1&showSaveButton=1&showSaveCloseButton=1&showPreviewButton=&showCloseButton=1&mode='.$mf->mode.'\',\'70%\',\'\',\''.$l10n->getLabel('mfSearchIndex','record_name').'\');">'.$l10n->getLabel('manageSearchIndex','new_record').'</button>';

plugins/mf_authentification/languages/mfAuthentificationPlugin_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

plugins/mf_users/languages/userGroupsTemplate_l10n.php 1

Type Line Description
10 www.apache.org/licenses/LICENSE-2.0

core/Autoloader.php 28

Type Line Description
9 www.apache.org/licenses/LICENSE-2.0
22 www.php-fig.org/psr/psr-4/examples/ sample.
50 instantiate the loader
53 register the autoloader
56 register the base directories for the namespace prefix
105 normalize namespace prefix
108 normalize the base directory with a trailing separator
111 initialize the namespace prefix array
116 retain the base directory for the namespace prefix
133 echo 'loadClass($class)<br/>'.chr(10);
135 the current namespace prefix
138 work backwards through the namespace names of the fully-qualified
139 class name to find a mapped file name
142 retain the trailing namespace separator in the prefix
145 the rest is the relative class name
148 try to load a mapped file for the prefix and relative class
154 remove the trailing namespace separator for the next iteration
155 of strrpos()
159 never found a mapped file
173 are there any base directories for this namespace prefix?
178 look through base directories for this namespace prefix
181 replace the namespace prefix with the base directory,
182 replace namespace separators with directory separators
183 in the relative class name, append with .php
188 echo 'loadMappedFile() = '.$file.'<br/>'.chr(10);
190 if the mapped file exists, require it
192 yes, we're done
197 never found it

core/cli_scripts/colors.php 7

Type Line Description
8 Set up shell colors
36 Returns colored string
40 Check if given foreground color found
44 Check if given background color found
49 Add string and end coloring
55 Returns all foreground color names
60 Returns all background color names

core/cli_scripts/configs/core-dossier.php 18

Type Line Description
7 Natural name of the plugin
10 Short description
13 Base ISO2 locale for localized files
16 Class name of the plugin
19 Folder name of the website where the plugin should be created
22 Folder name / plugin key of the plugin
31 Natural name of the module
34 Short description
37 Class name of the module
40 module type. Value should be either : frontend / backend or frontend,backend
52 Inserted record class name
55 SQL table name where the records will be stored
58 Inserted record natural name
61 Should the record be listed/edited into some module
64 Column name of the listed record's title field
67 create record Label
70 edit record label
79 Displayed record class name

core/cli_scripts/configs/taches-aerien.php 18

Type Line Description
7 Natural name of the plugin
10 Short description
13 Base ISO2 locale for localized files
16 Class name of the plugin
19 Folder name of the website where the plugin should be created
22 Folder name / plugin key of the plugin
31 Natural name of the module
34 Short description
37 Class name of the module
40 module type. Value should be either : frontend / backend or frontend,backend
52 Inserted record class name
55 SQL table name where the records will be stored
58 Inserted record natural name
61 Should the record be listed/edited into some module
64 Column name of the listed record's title field
67 create record Label
70 edit record label
79 Displayed record class name

core/cli_scripts/configs/taches-base-vente.php 18

Type Line Description
7 Natural name of the plugin
10 Short description
13 Base ISO2 locale for localized files
16 Class name of the plugin
19 Folder name of the website where the plugin should be created
22 Folder name / plugin key of the plugin
31 Natural name of the module
34 Short description
37 Class name of the module
40 module type. Value should be either : frontend / backend or frontend,backend
52 Inserted record class name
55 SQL table name where the records will be stored
58 Inserted record natural name
61 Should the record be listed/edited into some module
64 Column name of the listed record's title field
67 create record Label
70 edit record label
79 Displayed record class name

core/cli_scripts/configs/taches-compta.php 18

Type Line Description
7 Natural name of the plugin
10 Short description
13 Base ISO2 locale for localized files
16 Class name of the plugin
19 Folder name of the website where the plugin should be created
22 Folder name / plugin key of the plugin
31 Natural name of the module
34 Short description
37 Class name of the module
40 module type. Value should be either : frontend / backend or frontend,backend
52 Inserted record class name
55 SQL table name where the records will be stored
58 Inserted record natural name
61 Should the record be listed/edited into some module
64 Column name of the listed record's title field
67 create record Label
70 edit record label
79 Displayed record class name

core/cli_scripts/configs/taches-terrestre.php 18

Type Line Description
7 Natural name of the plugin
10 Short description
13 Base ISO2 locale for localized files
16 Class name of the plugin
19 Folder name of the website where the plugin should be created
22 Folder name / plugin key of the plugin
31 Natural name of the module
34 Short description
37 Class name of the module
40 module type. Value should be either : frontend / backend or frontend,backend
52 Inserted record class name
55 SQL table name where the records will be stored
58 Inserted record natural name
61 Should the record be listed/edited into some module
64 Column name of the listed record's title field
67 create record Label
70 edit record label
79 Displayed record class name

core/cli_scripts/functions.php 19

Type Line Description
70 {targetName}
76 [tagName]
78 [/tagName]
79 {targetName}
84 {module_insert_form} in the code.
85 [item_123] and //[/item_123]
94 trim first line if <?php marker is present
98 ['.$tagName.']') === false) {
105 the tag $tagName can't be found in $targetCode
106 insert section at target location, if it exists
107 {".$targetName."}",
108 ['.$tagName.']'.chr(10).$decay.$sectionCode.chr(10).$decay.'//[/'.$tagName.']'.chr(10).$decay."//{".$targetName."}",
112 echo "***test=true".chr(10);
113 replace existing section
114 [' . $tagName . ']'.' found, replacing it', 'green', null);
115 [' . $tagName . ']', '//[/' . $tagName . ']', chr(10) .$decay.$sectionCode.chr(10).$decay);
120 [drop]
122 [/drop] efhg";
124 echo $targetString.chr(10);

core/cli_scripts/plugin_add_form.php 16

Type Line Description
13 http://php.net/manual/en/features.commandline.php
18 Create new Colors class
115 value for moving to mf root dir
118 create records folder
123 create record php file
127 $formContent = str_replace("{recordClassName}",$recordClassName,$formContent);
129 $formContent = str_replace("{pluginKey}",$pluginKey,$formContent);
131 $formContent = str_replace("{SQLTableName}",$SQLTableName,$formContent);
133 finally, write plugin file
137 create language folder
140 create the record's l10n file
152 add //[/module_include_form] statement
159 add //[/module_insert_form] section
160 inserts form into the prepareData() record listing instruction set
168 write the module file
185 write the json file

core/cli_scripts/plugin_add_module.php 20

Type Line Description
13 http://php.net/manual/en/features.commandline.php
18 Create new Colors class
42 suggest class name from moduleNaturalName
150 add form ?
161 value for moving to mf root dir
164 create modules folder
167 create module php file
183 writeFile($chdir."/mf_websites/".$websiteFolderName."/plugins/".$pluginDirName.'/modules/'.$moduleClassName.'.php',$moduleContent);
185 filling prepareData() function
211 filling render() function
237 create module json file
242 create language folder
245 create module language main file
252 create ressources folder
255 copy module html template
261 load module in index.php
273 add module access user right
280 write plugin index file
283 create user right l10n file
301 finally, write module file

core/cli_scripts/plugin_add_record.php 19

Type Line Description
13 http://php.net/manual/en/features.commandline.php
18 Create new Colors class
43 suggest class name from moduleNaturalName
135 does this module lists any record ?
197 value for moving to mf root dir
200 create records folder
205 create record php file
214 finally, write plugin file
218 create language folder
221 create the record's l10n file
231 declare/load record into plugin's index.php
242 write plugin index file
245 add record listing
253 update //[/module_list_backend] section
254 add record list switch statement in function prepareData
256 update //[/module_list_backend] section
259 add record listing function to the module's php file
272 write the module file
277 update the module's l10n file

core/cli_scripts/plugin_create.php 9

Type Line Description
13 http://php.net/manual/en/features.commandline.php
18 Create new Colors class
66 suggest class name from pluginName
121 value for moving to mf root dir
124 create plugin folder
127 create plugin index.php file
134 create language folder
137 create plugin language main file
144 create plugin backend menu file