]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 3 Oct 2012 16:50:19 +0000 (16:50 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 3 Oct 2012 16:50:19 +0000 (16:50 +0000)
inc/ws/DAO/class.ws.dao.book.php
inc/ws/Util/class.ws.links.php

index fd5943078baeaa2d812e046ddf47053d08b0a795..e1756fc0482e7f82518715b1fc5f25c693b87dde 100644 (file)
@@ -440,7 +440,7 @@ class wsDAOBook extends commonDAO {
                foreach ($chapters as $c) {\r
                        $c['label'] = trim($c['label']);\r
                        $n = (string) $c['page'];\r
-                       $c['label'] = trim(preg_replace('|' . $n . '$|iu', '', $c['label']));\r
+                       $c['label'] = trim(preg_replace('|\s+' . $n . '$|iu', '', $c['label']));\r
                        $res[] = $c;\r
                }\r
 \r
index 8ca5cec4aa70ab94072533d86776e3f4aa0f0c92..65aba188c07ca2a06cb0a1554ac85efa8209b653 100644 (file)
@@ -27,13 +27,13 @@ class wsLinks {
                );
 
                new PHPExcel();
-               
-               $cacheMethod = PHPExcel_CachedObjectStorageFactory::cache_to_memcache;
-               $cacheSettings = array('memcacheServer' => 'localhost',
-                       'memcachePort' => 11211,
-                       'cacheTime' => 600
-               );
-               PHPExcel_Settings::setCacheStorageMethod($cacheMethod, $cacheSettings);
+
+               /* $cacheMethod = PHPExcel_CachedObjectStorageFactory::cache_to_memcache;
+                 $cacheSettings = array('memcacheServer' => 'localhost',
+                 'memcachePort' => 11211,
+                 'cacheTime' => 600
+                 );
+                 PHPExcel_Settings::setCacheStorageMethod($cacheMethod, $cacheSettings); */
 
 
                $xls = new PHPExcel();
@@ -72,24 +72,26 @@ class wsLinks {
                                        }
                                        $value = $l[$id];
                                }
-
-                               $s->setCellValueByColumnAndRow($i, $j, $value);
-                               $s->getStyleByColumnAndRow($i, $j)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_LEFT);
+                               if ($value != '') {
+                                       $s->setCellValueByColumnAndRow($i, $j, $value);
+                                       //$s->getStyleByColumnAndRow($i, $j)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_LEFT);
+                               }
                                $i++;
                        }
                        $j++;
                }
+
                // Rulers
                $s = $xls->createSheet();
                $s->setTitle('Rulers');
 
-               $rcols = array( 'page', 'type', 'pos');
+               $rcols = array('page', 'type', 'pos');
                $i = 0;
                // Labels
                foreach ($rcols as $id) {
                        $s->setCellValueByColumnAndRow($i, 1, $id);
                        $s->getColumnDimensionByColumn($i)->setAutoSize(true);
-                       $s->getStyleByColumnAndRow($i, 1)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);
+                       //$s->getStyleByColumnAndRow($i, 1)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);
                        $i++;
                }