From: <ada...@us...> - 2003-08-06 02:26:35
|
Update of /cvsroot/phpwebsite-comm/modules/article/class In directory sc8-pr-cvs1:/tmp/cvs-serv18667/class Modified Files: Article.php Section.php Log Message: Section templates now have no spaces in the file name. The new files are copied in and the old files are deleted with the update. Before updating, users must make sure that they have access permissions for the /article/templates/section set to 777. The import script is also updated to relfect the new filenames. Index: Article.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/Article.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Article.php 31 Jul 2003 22:33:51 -0000 1.9 --- Article.php 6 Aug 2003 02:26:32 -0000 1.10 *************** *** 575,579 **** /* Load templates to choose from */ $article_tpl_array = $GLOBALS['core']->listTemplates('article',true,'article'); ! if ($article_tpl_array) asort($article_tpl_array); $article_tags['TEMPLATE_LABEL'] = $_SESSION['translate']->it('Page Format').':'; $article_tags['TEMPLATE'] = $GLOBALS['core']->formSelect('ARTICLE_template', $article_tpl_array, $this->template, true, NULL, NULL) --- 575,583 ---- /* Load templates to choose from */ $article_tpl_array = $GLOBALS['core']->listTemplates('article',true,'article'); ! if ($article_tpl_array) ! { ! $article_tpl_array = str_replace('_',' ',$article_tpl_array); ! asort($article_tpl_array); ! } $article_tags['TEMPLATE_LABEL'] = $_SESSION['translate']->it('Page Format').':'; $article_tags['TEMPLATE'] = $GLOBALS['core']->formSelect('ARTICLE_template', $article_tpl_array, $this->template, true, NULL, NULL) *************** *** 678,682 **** $this->expiration_date = NULL; if (isset($_POST['ARTICLE_template'])) ! $this->template = $_POST['ARTICLE_template']; } --- 682,686 ---- $this->expiration_date = NULL; if (isset($_POST['ARTICLE_template'])) ! $this->template = str_replace(' ','_',$_POST['ARTICLE_template']); } Index: Section.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/Section.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Section.php 17 Jul 2003 18:07:24 -0000 1.4 --- Section.php 6 Aug 2003 02:26:32 -0000 1.5 *************** *** 303,308 **** unset($sect_tpl_array[$count]); } ! /* Strip the extensions off for readability */ $sect_tpl_array = str_replace('.tpl', NULL, $sect_tpl_array); /* Sort the list */ asort($sect_tpl_array); --- 303,309 ---- unset($sect_tpl_array[$count]); } ! /* Strip the extensions off & convert _ to spaces for readability */ $sect_tpl_array = str_replace('.tpl', NULL, $sect_tpl_array); + $sect_tpl_array = str_replace('_',' ',$sect_tpl_array); /* Sort the list */ asort($sect_tpl_array); *************** *** 370,374 **** $this->image['caption'] = $_POST['SECT_image_caption']; if (isset($_POST['SECT_template'])) ! $this->template = $_POST['SECT_template']; if (isset($_POST['SECT_new_page'])) $this->new_page = 1; --- 371,375 ---- $this->image['caption'] = $_POST['SECT_image_caption']; if (isset($_POST['SECT_template'])) ! $this->template = str_replace(' ','_',$_POST['SECT_template']); if (isset($_POST['SECT_new_page'])) $this->new_page = 1; |