From 7fc3f406d964cb6c5c9a5d99e80a72a16efbf7e2 Mon Sep 17 00:00:00 2001 From: rica-carv Date: Thu, 30 Jun 2016 14:56:30 +0100 Subject: [PATCH 01/24] Pull to solve missing pagination & quickreply shortcode Pull to solve missing pagination & quickreply shortcode --- e107_plugins/forum/forum_viewtopic.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/e107_plugins/forum/forum_viewtopic.php b/e107_plugins/forum/forum_viewtopic.php index d3c0f8e68..27a103266 100644 --- a/e107_plugins/forum/forum_viewtopic.php +++ b/e107_plugins/forum/forum_viewtopic.php @@ -473,6 +473,10 @@ $i = $thread->page; //---- Moved upwards, to enclose $tVars... //---- $sc = e107::getScBatch('view', 'forum'); + $mes = e107::getMessage(); +// $sc->setVars($thread->threadInfo); +//--->$forend = $tp->simpleParse($FORUMEND, $tVars); +$forend = $tp->parseTemplate($FORUMEND, true, $sc); foreach ($postList as $c => $postInfo) @@ -538,6 +542,7 @@ foreach ($postList as $c => $postInfo) } unset($loop_uid); +/*----> if ($forum->checkPerm($thread->threadInfo['thread_forum_id'], 'post') && $thread->threadInfo['thread_active']) { //XXX Show only on the last page?? @@ -578,11 +583,14 @@ if ($forum->checkPerm($thread->threadInfo['thread_forum_id'], 'post') && $thread $tVars->QUICKREPLY = $forum_quickreply; } } +<----*/ - +/*---> $mes = e107::getMessage(); -$forend = $tp->simpleParse($FORUMEND, $tVars); - + $sc->setVars($thread->threadInfo); +//--->$forend = $tp->simpleParse($FORUMEND, $tVars); +$forend = $tp->parseTemplate($FORUMEND, true, $sc); +<---*/ $forumstring = $forstr . $forthr . vartrue($forrep) . $forend; //If last post came after USERLV and not yet marked as read, mark the thread id as read From 3ff4df2d253985beb9a35ff6972e64d1efe65548 Mon Sep 17 00:00:00 2001 From: rica-carv Date: Thu, 30 Jun 2016 14:57:37 +0100 Subject: [PATCH 02/24] Add files via upload From 91e3555193abd12cf3bf163c1b361f71c0acbd6e Mon Sep 17 00:00:00 2001 From: rica-carv Date: Thu, 30 Jun 2016 14:58:16 +0100 Subject: [PATCH 03/24] Add files via upload --- .../shortcodes/batch/view_shortcodes.php | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/e107_plugins/forum/shortcodes/batch/view_shortcodes.php b/e107_plugins/forum/shortcodes/batch/view_shortcodes.php index 63044ee45..0cbf6ddc9 100644 --- a/e107_plugins/forum/shortcodes/batch/view_shortcodes.php +++ b/e107_plugins/forum/shortcodes/batch/view_shortcodes.php @@ -885,5 +885,51 @@ function sc_message() return $thread->message; } + function sc_quickreply() + { + global $forum, $forum_quickreply; + +if ($forum->checkPerm($this->var['thread_forum_id'], 'post') && $this->var['thread_active']) +{ + //XXX Show only on the last page?? + if (!vartrue($forum_quickreply)) + { + $ajaxInsert = ($thread->pages == $thread->page || $thread->pages == 0) ? 1 : 0; + // $ajaxInsert = 1; + // echo "AJAX-INSERT=".$ajaxInsert ."(".$thread->pages." vs ".$thread->page.")"; + $frm = e107::getForm(); + + $urlParms = array('f'=>'rp','id'=>$this->var['thread_id'], 'post'=>$this->var['thread_id']); + $url = e107::url('forum','post', null, array('query'=>$urlParms));; // ."?f=rp&id=".$thread->threadInfo['thread_id']."&post=".$thread->threadInfo['thread_id']; + + return " +
+
+ +
+
+ + +
+ +
"; + + if(E107_DEBUG_LEVEL > 0) + { + // echo "
Thread id: ".$threadId."
"; + // print_a($this); + } + + + + // Preview should be reserved for the full 'Post reply' page.   + } + else + { + return $forum_quickreply; + } +} + } + } ?> \ No newline at end of file From e24805ecea71c809aa0ab627b9d5b7a88666aa08 Mon Sep 17 00:00:00 2001 From: rica-carv Date: Thu, 30 Jun 2016 15:49:00 +0100 Subject: [PATCH 04/24] Add files via upload --- e107_plugins/forum/forum_viewtopic.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e107_plugins/forum/forum_viewtopic.php b/e107_plugins/forum/forum_viewtopic.php index 27a103266..d3af3edc9 100644 --- a/e107_plugins/forum/forum_viewtopic.php +++ b/e107_plugins/forum/forum_viewtopic.php @@ -907,7 +907,7 @@ class e107ForumThread $ns = e107::getRender(); $sql = e107::getDb(); $tp = e107::getParser(); - $frm = e107::getForm(); +//Orphan $frm variable???? $frm = e107::getForm(); if (empty($_GET['f'])) { From a7142dc9b04612103ee3331d244927e39effaabf Mon Sep 17 00:00:00 2001 From: rica-carv Date: Thu, 30 Jun 2016 15:49:36 +0100 Subject: [PATCH 05/24] Add files via upload --- e107_plugins/forum/shortcodes/batch/view_shortcodes.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/e107_plugins/forum/shortcodes/batch/view_shortcodes.php b/e107_plugins/forum/shortcodes/batch/view_shortcodes.php index 0cbf6ddc9..1031f8720 100644 --- a/e107_plugins/forum/shortcodes/batch/view_shortcodes.php +++ b/e107_plugins/forum/shortcodes/batch/view_shortcodes.php @@ -897,7 +897,7 @@ if ($forum->checkPerm($this->var['thread_forum_id'], 'post') && $this->var['thre $ajaxInsert = ($thread->pages == $thread->page || $thread->pages == 0) ? 1 : 0; // $ajaxInsert = 1; // echo "AJAX-INSERT=".$ajaxInsert ."(".$thread->pages." vs ".$thread->page.")"; - $frm = e107::getForm(); +//Orphan $frm variable???? $frm = e107::getForm(); $urlParms = array('f'=>'rp','id'=>$this->var['thread_id'], 'post'=>$this->var['thread_id']); $url = e107::url('forum','post', null, array('query'=>$urlParms));; // ."?f=rp&id=".$thread->threadInfo['thread_id']."&post=".$thread->threadInfo['thread_id']; @@ -924,10 +924,10 @@ if ($forum->checkPerm($this->var['thread_forum_id'], 'post') && $this->var['thre // Preview should be reserved for the full 'Post reply' page.   } - else - { +//---- else +//---- { return $forum_quickreply; - } +//---- } } } From 7a90a38473345c14f8793dffdcb95fe6bea8d89f Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 30 Jun 2016 08:38:32 -0700 Subject: [PATCH 06/24] Prevent gallery js loading on every admin page. --- e107_plugins/gallery/e_header.php | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/e107_plugins/gallery/e_header.php b/e107_plugins/gallery/e_header.php index 46c02e2e8..a07192ab2 100644 --- a/e107_plugins/gallery/e_header.php +++ b/e107_plugins/gallery/e_header.php @@ -13,19 +13,21 @@ if(!defined('e107_INIT')) if(USER_AREA) { -// Work-around for indent issue. see: https://github.com/twitter/bootstrap/issues/4890 - e107::css('inline', " -/* Gallery CSS */ -.thumbnails .span2:nth-child(6n+1) { -margin-left:0; -}", 'jquery'); -} + // Work-around for indent issue. see: https://github.com/twitter/bootstrap/issues/4890 + e107::css('inline', " + /* Gallery CSS */ + .thumbnails .span2:nth-child(6n+1) { + margin-left:0; + }", 'jquery'); -$plugPrefs = e107::getPlugConfig('gallery')->getPref(); -if(vartrue($plugPrefs['pp_global'], false)) -{ - e107_require_once(e_PLUGIN . 'gallery/includes/gallery_load.php'); - // Load prettyPhoto settings and files. - gallery_load_prettyphoto(); + $plugPrefs = e107::getPlugConfig('gallery')->getPref(); + + if(vartrue($plugPrefs['pp_global'], false)) + { + e107_require_once(e_PLUGIN . 'gallery/includes/gallery_load.php'); + // Load prettyPhoto settings and files. + gallery_load_prettyphoto(); + } + } From a985a6e9b1d74a548c86362b7aaac1dc84b849c8 Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 30 Jun 2016 08:50:35 -0700 Subject: [PATCH 07/24] Issue #1746 - Downloads datestamp not being saved correctly. --- e107_plugins/download/includes/admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e107_plugins/download/includes/admin.php b/e107_plugins/download/includes/admin.php index f02627cbb..28e8735ea 100644 --- a/e107_plugins/download/includes/admin.php +++ b/e107_plugins/download/includes/admin.php @@ -1699,7 +1699,7 @@ $columnInfo = array( $dlInfo['download_comment'] = $tp->toDB($_POST['download_comment']); $dlInfo['download_class'] = $tp->toDB($_POST['download_class']); $dlInfo['download_visible'] = $tp->toDB($_POST['download_visible']); - $dlInfo['download_datestamp'] = e107::getDate()->convert($_POST['download_datestamp'],'inputdate'); + $dlInfo['download_datestamp'] = intval($_POST['download_datestamp']); if($_POST['update_datestamp']) From d44a92dcbaec12581b1ba35f2c5948ed7926749f Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 1 Jul 2016 16:09:42 -0700 Subject: [PATCH 08/24] Fix for news video thumbnail size in latest news etc. --- e107_core/shortcodes/batch/news_shortcodes.php | 1 + 1 file changed, 1 insertion(+) diff --git a/e107_core/shortcodes/batch/news_shortcodes.php b/e107_core/shortcodes/batch/news_shortcodes.php index 9c2fbdde6..4519c4c31 100644 --- a/e107_core/shortcodes/batch/news_shortcodes.php +++ b/e107_core/shortcodes/batch/news_shortcodes.php @@ -612,6 +612,7 @@ class news_shortcodes extends e_shortcode { $src = $vThumb; $_src = '#'; + $dimensions = e107::getParser()->thumbDimensions(); } else { From d511bb6c9a9d2803af0c654936921ef2b7adfe48 Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 1 Jul 2016 16:10:24 -0700 Subject: [PATCH 09/24] Fixes #1757 - Page 'related' items template. --- e107_core/shortcodes/batch/page_shortcodes.php | 9 +++++++-- e107_core/templates/page_template.php | 10 ++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/e107_core/shortcodes/batch/page_shortcodes.php b/e107_core/shortcodes/batch/page_shortcodes.php index de44cb641..b65a99c6a 100644 --- a/e107_core/shortcodes/batch/page_shortcodes.php +++ b/e107_core/shortcodes/batch/page_shortcodes.php @@ -534,8 +534,13 @@ class cpage_shortcodes extends e_shortcode { $array['types'] = 'page,news'; } - - return e107::getForm()->renderRelated($array, $this->var['page_metakeys'], array('page'=>$this->var['page_id'])); + + $templateID = vartrue($this->var['page_template'],'default'); + + $template = e107::getCoreTemplate('page', $templateID); + + + return e107::getForm()->renderRelated($array, $this->var['page_metakeys'], array('page'=>$this->var['page_id']), $template['related']); } diff --git a/e107_core/templates/page_template.php b/e107_core/templates/page_template.php index 817b577e0..574d721d0 100644 --- a/e107_core/templates/page_template.php +++ b/e107_core/templates/page_template.php @@ -94,8 +94,18 @@ $sc_style['CPAGENAV|default']['post'] = ''; // define different tablerender mode here $PAGE_TEMPLATE['default']['tableRender'] = 'cpage'; + + + $PAGE_TEMPLATE['default']['related']['start'] = '{SETIMAGE: w=350&h=350&crop=1}

{LAN=LAN_RELATED}

'; + $PAGE_TEMPLATE['default']['related']['item'] = ''; + $PAGE_TEMPLATE['default']['related']['end'] = '
'; + + + #### No table render example template #### + + $PAGE_TEMPLATE['custom']['start'] = '
'; $PAGE_TEMPLATE['custom']['body'] = ''; $PAGE_TEMPLATE['custom']['authorize'] = ' From 61ce9395f414ed2dd953e8d1d925224ff7345212 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sat, 2 Jul 2016 11:44:28 -0700 Subject: [PATCH 10/24] Fix for PHP error --- e107_plugins/tinymce4/tinymce4_setup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e107_plugins/tinymce4/tinymce4_setup.php b/e107_plugins/tinymce4/tinymce4_setup.php index b76f52111..a0c5ae5eb 100644 --- a/e107_plugins/tinymce4/tinymce4_setup.php +++ b/e107_plugins/tinymce4/tinymce4_setup.php @@ -19,7 +19,7 @@ class tinymce4_setup { $list = e107::getConfig()->get('e_meta_list'); - if(in_array('tinymce4',$list)) + if(!empty($list) && in_array('tinymce4',$list)) { return true; } From f2b286d1a121df2a9aecb99dce008b1a5a343713 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sun, 3 Jul 2016 19:47:23 -0700 Subject: [PATCH 11/24] Fix for getModel() in custom form method 'read' mode. --- e107_handlers/admin_ui.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/e107_handlers/admin_ui.php b/e107_handlers/admin_ui.php index 80efe6213..fa8a48f0d 100644 --- a/e107_handlers/admin_ui.php +++ b/e107_handlers/admin_ui.php @@ -2770,6 +2770,12 @@ class e_admin_controller_ui extends e_admin_controller $this->_setModel(); } + if($this->getQuery('action') == 'list') // allow for use of getModel() at all times. + { + return $this->getListModel(); + } + + return $this->_model; } From 84c28f6fc9503008186884a34ee1609057221d22 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sun, 3 Jul 2016 20:11:26 -0700 Subject: [PATCH 12/24] Added country() method to form handler. --- e107_handlers/form_handler.php | 292 +++++++++++++++++++++++++++++++++ 1 file changed, 292 insertions(+) diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index fe7cd402e..904e099fb 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -157,6 +157,298 @@ class e_form } + /** + * Render a country drop-down list. + * @param string $name + * @param string $value + * @param array $options + * @return string + */ + public function country($name, $value, $options=array()) + { + + $arr = $this->getCountry(); + + $placeholder = isset($options['placeholder']) ? $options['placeholder'] : ' '; + + return $this->select($name, $arr, $value, $options, $placeholder); + } + + + /** + * Get a list of countries. + * @param null $iso + */ + private function getCountry($iso=null) // move to parser? + { + + $c = array(); + + $c['af'] = "Afghanistan"; + $c['al'] = "Albania"; + $c['dz'] = "Algeria"; + $c['as'] = "American Samoa"; + $c['ad'] = "Andorra"; + $c['ao'] = "Angola"; + $c['ai'] = "Anguilla"; + $c['aq'] = "Antarctica"; + $c['ag'] = "Antigua and Barbuda"; + $c['ar'] = "Argentina"; + $c['am'] = "Armenia"; + $c['aw'] = "Aruba"; + $c['au'] = "Australia"; + $c['at'] = "Austria"; + $c['az'] = "Azerbaijan"; + $c['bs'] = "Bahamas"; + $c['bh'] = "Bahrain"; + $c['bd'] = "Bangladesh"; + $c['bb'] = "Barbados"; + $c['by'] = "Belarus"; + $c['be'] = "Belgium"; + $c['bz'] = "Belize"; + $c['bj'] = "Benin"; + $c['bm'] = "Bermuda"; + $c['bt'] = "Bhutan"; + $c['bo'] = "Bolivia"; + $c['ba'] = "Bosnia-Herzegovina"; + $c['bw'] = "Botswana"; + $c['bv'] = "Bouvet Island"; + $c['br'] = "Brazil"; + $c['io'] = "British Indian Ocean Territory"; + $c['bn'] = "Brunei Darussalam"; + $c['bg'] = "Bulgaria"; + $c['bf'] = "Burkina Faso"; + $c['bi'] = "Burundi"; + $c['kh'] = "Cambodia"; + $c['cm'] = "Cameroon"; + $c['ca'] = "Canada"; + + $c['cv'] = "Cape Verde"; + $c['ky'] = "Cayman Islands"; + $c['cf'] = "Central African Republic"; + $c['td'] = "Chad"; + $c['cl'] = "Chile"; + $c['cn'] = "China"; + $c['cx'] = "Christmas Island"; + $c['cc'] = "Cocos (Keeling) Islands"; + $c['co'] = "Colombia"; + $c['km'] = "Comoros"; + $c['cg'] = "Congo"; + $c['cd'] = "Congo (Dem.Rep)"; + $c['ck'] = "Cook Islands"; + $c['cr'] = "Costa Rica"; + $c['hr'] = "Croatia"; + $c['cu'] = "Cuba"; + $c['cy'] = "Cyprus"; + $c['cz'] = "Czech Republic"; + $c['dk'] = "Denmark"; + $c['dj'] = "Djibouti"; + $c['dm'] = "Dominica"; + $c['do'] = "Dominican Republic"; + $c['tp'] = "East Timor"; + $c['ec'] = "Ecuador"; + $c['eg'] = "Egypt"; + $c['sv'] = "El Salvador"; + $c['gq'] = "Equatorial Guinea"; + $c['er'] = "Eritrea"; + $c['ee'] = "Estonia"; + $c['et'] = "Ethiopia"; + $c['fk'] = "Falkland Islands"; + $c['fo'] = "Faroe Islands"; + $c['fj'] = "Fiji"; + $c['fi'] = "Finland"; + // $c['cs'] = "Former Czechoslovakia"; + // $c['su'] = "Former USSR"; + $c['fr'] = "France"; + // $c['fx'] = "France (European Territory)"; + $c['gf'] = "French Guyana"; + $c['tf'] = "French Southern Territories"; + $c['ga'] = "Gabon"; + $c['gm'] = "Gambia"; + $c['ge'] = "Georgia"; + $c['de'] = "Germany"; + $c['gh'] = "Ghana"; + $c['gi'] = "Gibraltar"; + $c['gr'] = "Greece"; + $c['gl'] = "Greenland"; + $c['gd'] = "Grenada"; + $c['gp'] = "Guadeloupe (French)"; + $c['gu'] = "Guam (USA)"; + $c['gt'] = "Guatemala"; + $c['gn'] = "Guinea"; + $c['gw'] = "Guinea Bissau"; + $c['gy'] = "Guyana"; + $c['ht'] = "Haiti"; + $c['hm'] = "Heard and McDonald Islands"; + $c['hn'] = "Honduras"; + $c['hk'] = "Hong Kong"; + $c['hu'] = "Hungary"; + $c['is'] = "Iceland"; + $c['in'] = "India"; + $c['id'] = "Indonesia"; + $c['ir'] = "Iran"; + $c['iq'] = "Iraq"; + $c['ie'] = "Ireland"; + $c['il'] = "Israel"; + $c['it'] = "Italy"; + $c['ci'] = "Ivory Coast (Cote D'Ivoire)"; + $c['jm'] = "Jamaica"; + $c['jp'] = "Japan"; + $c['jo'] = "Jordan"; + $c['kz'] = "Kazakhstan"; + $c['ke'] = "Kenya"; + $c['ki'] = "Kiribati"; + $c['kp'] = "Korea (North)"; + $c['kr'] = "Korea (South)"; + $c['kw'] = "Kuwait"; + $c['kg'] = "Kyrgyzstan"; + $c['la'] = "Laos"; + $c['lv'] = "Latvia"; + $c['lb'] = "Lebanon"; + $c['ls'] = "Lesotho"; + $c['lr'] = "Liberia"; + $c['ly'] = "Libya"; + $c['li'] = "Liechtenstein"; + $c['lt'] = "Lithuania"; + $c['lu'] = "Luxembourg"; + $c['mo'] = "Macau"; + $c['mk'] = "Macedonia"; + $c['mg'] = "Madagascar"; + $c['mw'] = "Malawi"; + $c['my'] = "Malaysia"; + $c['mv'] = "Maldives"; + $c['ml'] = "Mali"; + $c['mt'] = "Malta"; + $c['mh'] = "Marshall Islands"; + $c['mq'] = "Martinique (French)"; + $c['mr'] = "Mauritania"; + $c['mu'] = "Mauritius"; + $c['yt'] = "Mayotte"; + $c['mx'] = "Mexico"; + $c['fm'] = "Micronesia"; + $c['md'] = "Moldavia"; + $c['mc'] = "Monaco"; + $c['mn'] = "Mongolia"; + $c['me'] = "Montenegro"; + $c['ms'] = "Montserrat"; + $c['ma'] = "Morocco"; + $c['mz'] = "Mozambique"; + $c['mm'] = "Myanmar"; + $c['na'] = "Namibia"; + $c['nr'] = "Nauru"; + $c['np'] = "Nepal"; + $c['nl'] = "Netherlands"; + $c['an'] = "Netherlands Antilles"; + // $c['net'] = "Network"; + + $c['nc'] = "New Caledonia (French)"; + $c['nz'] = "New Zealand"; + $c['ni'] = "Nicaragua"; + $c['ne'] = "Niger"; + $c['ng'] = "Nigeria"; + $c['nu'] = "Niue"; + $c['nf'] = "Norfolk Island"; + + $c['mp'] = "Northern Mariana Islands"; + $c['no'] = "Norway"; + // $c['arpa'] = "Old style Arpanet"; + $c['om'] = "Oman"; + $c['pk'] = "Pakistan"; + $c['pw'] = "Palau"; + $c['pa'] = "Panama"; + $c['pg'] = "Papua New Guinea"; + $c['py'] = "Paraguay"; + $c['pe'] = "Peru"; + $c['ph'] = "Philippines"; + $c['pn'] = "Pitcairn Island"; + $c['pl'] = "Poland"; + $c['pf'] = "Polynesia (French)"; + $c['pt'] = "Portugal"; + $c['pr'] = "Puerto Rico"; + $c['ps'] = "Palestine"; + $c['qa'] = "Qatar"; + $c['re'] = "Reunion (French)"; + $c['ro'] = "Romania"; + $c['ru'] = "Russia"; + $c['rw'] = "Rwanda"; + $c['gs'] = "S. Georgia & S. Sandwich Isls."; + $c['sh'] = "Saint Helena"; + $c['kn'] = "Saint Kitts & Nevis"; + $c['lc'] = "Saint Lucia"; + $c['pm'] = "Saint Pierre and Miquelon"; + $c['st'] = "Saint Tome (Sao Tome) and Principe"; + $c['vc'] = "Saint Vincent & Grenadines"; + $c['ws'] = "Samoa"; + $c['sm'] = "San Marino"; + $c['sa'] = "Saudi Arabia"; + $c['sn'] = "Senegal"; + $c['rs'] = "Serbia"; + $c['sc'] = "Seychelles"; + $c['sl'] = "Sierra Leone"; + $c['sg'] = "Singapore"; + $c['sk'] = "Slovak Republic"; + $c['si'] = "Slovenia"; + $c['sb'] = "Solomon Islands"; + $c['so'] = "Somalia"; + $c['za'] = "South Africa"; + + $c['es'] = "Spain"; + $c['lk'] = "Sri Lanka"; + $c['sd'] = "Sudan"; + $c['sr'] = "Suriname"; + $c['sj'] = "Svalbard and Jan Mayen Islands"; + $c['sz'] = "Swaziland"; + $c['se'] = "Sweden"; + $c['ch'] = "Switzerland"; + $c['sy'] = "Syria"; + $c['tj'] = "Tadjikistan"; + $c['tw'] = "Taiwan"; + $c['tz'] = "Tanzania"; + $c['th'] = "Thailand"; + $c['ti'] = "Tibet"; + $c['tg'] = "Togo"; + $c['tk'] = "Tokelau"; + $c['to'] = "Tonga"; + $c['tt'] = "Trinidad and Tobago"; + $c['tn'] = "Tunisia"; + $c['tr'] = "Turkey"; + $c['tm'] = "Turkmenistan"; + $c['tc'] = "Turks and Caicos Islands"; + $c['tv'] = "Tuvalu"; + $c['ug'] = "Uganda"; + $c['ua'] = "Ukraine"; + $c['ae'] = "United Arab Emirates"; + $c['gb'] = "United Kingdom"; + $c['us'] = "United States"; + $c['uy'] = "Uruguay"; + $c['um'] = "US Minor Outlying Islands"; + $c['uz'] = "Uzbekistan"; + $c['vu'] = "Vanuatu"; + $c['va'] = "Vatican City State"; + $c['ve'] = "Venezuela"; + $c['vn'] = "Vietnam"; + $c['vg'] = "Virgin Islands (British)"; + $c['vi'] = "Virgin Islands (USA)"; + $c['wf'] = "Wallis and Futuna Islands"; + $c['eh'] = "Western Sahara"; + $c['ye'] = "Yemen"; + + // $c['zr'] = "(deprecated) Zaire"; + $c['zm'] = "Zambia"; + $c['zw'] = "Zimbabwe"; + + + if(!empty($iso) && !empty($c[$iso])) + { + return $c[$iso]; + } + + + return $c; + + } + + /** * Get required field markup string * @return string From 708db3597adcdcff8cb8c6dfefcf71ad05a86005 Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 4 Jul 2016 12:24:38 -0700 Subject: [PATCH 13/24] make getCountry() public. --- e107_handlers/form_handler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 904e099fb..da259bfea 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -179,7 +179,7 @@ class e_form * Get a list of countries. * @param null $iso */ - private function getCountry($iso=null) // move to parser? + public function getCountry($iso=null) // move to parser? { $c = array(); From 2a1430860068d645d78eae974011e56072d49715 Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 6 Jul 2016 09:58:17 -0700 Subject: [PATCH 14/24] Fixes #1762 - Media-Manager Youtube thumbnail should use https. Removed debug info on db_verify. Hide carousel navigation when only 1 slide present. --- e107_admin/image.php | 2 +- e107_handlers/db_verify_class.php | 7 +++++ e107_handlers/form_handler.php | 50 ++++++++++++++++++------------- 3 files changed, 38 insertions(+), 21 deletions(-) diff --git a/e107_admin/image.php b/e107_admin/image.php index 52fe544db..3c8c039a2 100644 --- a/e107_admin/image.php +++ b/e107_admin/image.php @@ -1478,7 +1478,7 @@ class media_admin_ui extends e_admin_ui $data = array(); $data['items'][0]['id']['videoId'] = $searchQry; - $data['items'][0]['snippet']['thumbnails']['medium']['url'] = "http://i.ytimg.com/vi/".$searchQry."/mqdefault.jpg"; + $data['items'][0]['snippet']['thumbnails']['medium']['url'] = "https://i.ytimg.com/vi/".$searchQry."/mqdefault.jpg"; $data['items'][0]['snippet']['title'] = 'Specified Video'; } elseif(substr($searchQry,0,9) == 'playlist:') // playlist diff --git a/e107_handlers/db_verify_class.php b/e107_handlers/db_verify_class.php index 63519d029..7942a3ba1 100644 --- a/e107_handlers/db_verify_class.php +++ b/e107_handlers/db_verify_class.php @@ -201,6 +201,13 @@ class db_verify $this->currentTable = $selection; + if(!isset($this->tables[$selection])) // doesn't have an SQL file. + { + // e107::getMessage()->addDebug("No SQL File for ".$selection); + return false; + } + + if(empty($this->tables[$selection]['tables'])) { //$this->internalError = true; diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index da259bfea..542e83e54 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -604,21 +604,28 @@ class e_form $text =' - '; return $text; From e2d70a4284b3418dae756bf1f6ca99dfba3b1a62 Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 6 Jul 2016 17:08:17 -0700 Subject: [PATCH 15/24] Fix for adding media with '+' in the filename. --- e107_admin/image.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e107_admin/image.php b/e107_admin/image.php index 3c8c039a2..15ba59d1c 100644 --- a/e107_admin/image.php +++ b/e107_admin/image.php @@ -1633,7 +1633,7 @@ class media_admin_ui extends e_admin_ui } - $fileName = str_replace('%','',$fileName); + $fileName = str_replace(array('%','+'),'',$fileName); // remove script extensions. if(substr($fileName,-4) == ".php" || substr($fileName,-4) == ".htm" || substr($fileName,-5) == ".html" || substr($fileName,-4) == ".asp") From 99a3c0fac2cf095f45e96ab26d1d506842e73307 Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 6 Jul 2016 18:23:53 -0700 Subject: [PATCH 16/24] Fix for Sitelinks tooltip preference. (and footer links) --- e107_core/templates/navigation_template.php | 8 ++++---- e107_handlers/sitelinks_class.php | 8 ++++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/e107_core/templates/navigation_template.php b/e107_core/templates/navigation_template.php index a8ccbf8de..79d80cc48 100644 --- a/e107_core/templates/navigation_template.php +++ b/e107_core/templates/navigation_template.php @@ -97,13 +97,13 @@ $NAVIGATION_TEMPLATE['main']['submenu_end'] = ''; $NAVIGATION_TEMPLATE['side']['start'] = ' @@ -128,9 +128,9 @@ $NAVIGATION_TEMPLATE['side']['submenu_end'] = ''; // Footer links. - ie. 3 columns of links. $NAVIGATION_TEMPLATE["footer"]["start"] = "\n"; $NAVIGATION_TEMPLATE["footer"]["submenu_start"] = "