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ib9|AyILmyS4W*_~3
D#>pC1
diff --git a/misc/package/ASUStor/CONTROL/icon-enable.png b/misc/package/ASUStor/CONTROL/icon-enable.png
deleted file mode 100644
index 4c06045b1d6dbb9b2b772b4aa52804407990a8ef..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 4713
zcmV-v5|-_WP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iyl7
z5iA#`!Da0L01@d)L_t(|+U;F?a1~XW|DAKX`}Te1MSu|AFc1?Z&JYkNP(bjpu3GMj
zfWorlI5qAnTkBZrR_$6fe{4;STU$FbtFz!faCgdOd<+UYin2Tu7&&qz#*G_?
zva&KT#!dj(0N_6Woa~R$Afo<`9}v;mwzf9fv}qGP^2j4JZQ3*{Dk`E-C`9%w6X)D*
zGsfJuEX(dWr;qpV*$(gZgb*3mbN=6ZUXrBC?%BJK_rBiqPMa~-XaC;M6OBe`(xgeW
zV#NwtzkWTPKYyNxsDp@pLPTm`e5|jp&&udRB6_K#qk}eV*g$vPb(hQ7P$)!-qEH|Z
zpl~=$vMiILC?v}=an6Y`HYjH1;_%+*>)ewu=8icUjZ!!qCLsg~Au=Yp_vACiC=?2j
zs;UHl!r?I8c;k(
zC_}=?Z|cE0r$8V;LI_e6g(8s%Em^XJ_Uze1rfHrhq8S4*x{!$W@7}$e?!NnO;+#`B
z9Hw9}=t}M%GlR3e9f3fABuS#0ni|@;aUgqaj|NZxq
zEX%G$`wY9fBNzBmuaowzjsiwzd|MBq5nh!l$bv#uzkB!_lKh
zap1s#(9)$#@8SUN*t2I3Z)j+M5W;76E`lONP!t7iZEe`Pbt`7gnze`xg$-}5R1id>C&YT*ECJ^^z=YgRbQHOOtLH^7K#n7zTt8FijJjF$PstkxV9Gnx@a498xNka+4t3G))+Wfj}VOV|1RR+As`D
zqEo39bX^DM+~-UloEIWWLx*p5m9}+@<>$(nI*CB-PIg+QChYKB!3F1@kNl}zEbU45Glpi~qF=j!BQ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#u|9xp^lyO>=8aP0iV0
zFbKxE4<9*#48a9VBFvgK%c!lbeUqD}d2z~=DX-3)F#|n4Jx~Lu9h5s*ofJS~7{{%a>!vjvfCTkH^6!
zNrGV*r>d)~|7FRNCD1etjPoHYbb+=)Yn
z4q@rirKqm1p0aV{#)j(ZYWE|Ne)UrSha^c9iA1QNpnxPHXynL|^x}&zCYLW?etX7j
z?Ao;phYugdLk~R!0GK;>?u?BaH#W|hGspTAk*ZQK81z3-)|Xf#TpP>3WU
zXyU|)w0`}1ZRN_9%P$lAy?giK$dMy>@WBV&b2r>@L)9B^yivDm)hY@o3JLoIlB%kb
z5Mszab&7B3cMBtt2o)9ZyNhZf<^L-MV$sp+kqmD$JZY^YyiB*FL#(=gyOXUIpofVSpVxc+h=7uM6(1
zYbh-)otaD~AFHdYyK~2m9R;6!@(G%nn$X?dZ562NI+*PV={D1y1)|J;Slwox5CVEC
z1?DhS*TIDVb0)`b>xN>A3
diff --git a/misc/package/ASUStor/apkg_build b/misc/package/ASUStor/apkg_build
deleted file mode 100644
index 091e936100f..00000000000
--- a/misc/package/ASUStor/apkg_build
+++ /dev/null
@@ -1,441 +0,0 @@
-#!/bin/sh
-
-# pkg-build -- construct a debian file format .apk from a directory
-# Walker Lee
-# based on a script by Steve Redler IV, steve@sr-tech.com 5-21-2001
-
-set -e
-
-TMP_DIR="/tmp"
-THIS_DIR=`pwd`
-SCRIPT_PATH=`readlink -f $0`
-SCRIPT_DIR=`dirname ${SCRIPT_PATH}`
-
-JSON_GREP="python $SCRIPT_DIR/jsongrep.py"
-
-PKG_BUILD_PROGRAM=`basename $0`
-#PKG_BUILD_PROGRAM="apkg-build"
-PKG_BUILD_VER="1.0"
-PKG_BUILD_FORMAT="zip" # ar, tar, zip
-
-PKG_CONTROL_DIR="CONTROL"
-PKG_WEBMAN_DIR="webman"
-PKG_WEB_DIR="www"
-
-PKG_WEB_USER="admin"
-PKG_WEB_GROUP="administrators"
-
-PKG_WEB_USER_ID=999
-PKG_WEB_GROUP_ID=999
-
-PKG_WEB_PERM=770
-
-PKG_DIR_PERM=755
-PKG_FILE_PERM=644
-
-PKG_VERSION_FILE="apkg-version"
-PKG_DATA_FILE="data.tar.gz"
-PKG_CONTROL_FILE="control.tar.gz"
-
-PKG_CONFIG_FILE="config.json"
-PKG_ICON_ENABLE_FILE="icon-enable.png"
-PKG_ICON_DISABLE_FILE="icon-disable.png"
-
-PKG_PRE_INSTALL_SCRIPT="pre-install.sh"
-PKG_PRE_UNINSTALL_SCRIPT="pre-uninstall.sh"
-
-PKG_POST_INSTALL_SCRIPT="post-install.sh"
-PKG_POST_UNINSTALL_SCRIPT="post-uninstall.sh"
-
-PKG_START_STOP_SCRIPT="start-stop.sh"
-
-PKG_SCRIPT_LIST="$PKG_PRE_INSTALL_SCRIPT $PKG_PRE_UNINSTALL_SCRIPT \
- $PKG_POST_INSTALL_SCRIPT $PKG_POST_UNINSTALL_SCRIPT \
- $PKG_START_STOP_SCRIPT"
-
-PKG_SRC_DIR=$1
-PKG_DEST_DIR=$2
-PKG_TMP_DIR=$TMP_DIR/APKG_BUILD.$$
-
-PKG_SUFFIX="apk"
-
-
-pkg_struct_check() {
- local owd=`pwd`
- local error=0
-
- # check pkg base dir
- if [ ! -d $PKG_SRC_DIR ]; then
- echo " *** Error: Directory $PKG_SRC_DIR does not exist" >&2
- return 1
- fi
-
- cd $PKG_SRC_DIR
-
- # check pkg control dir
- if [ ! -d "$PKG_CONTROL_DIR" ]; then
- echo " *** Error: Directory $PKG_SRC_DIR has no $PKG_CONTROL_DIR subdirectory." >&2
- error=1
- fi
-
- # check pkg config file
- if [ ! -f "$PKG_CONTROL_DIR/$PKG_CONFIG_FILE" ]; then
- echo " *** Error: Package config file $PKG_SRC_DIR/$PKG_CONTROL_DIR/$PKG_CONFIG_FILE not found." >&2
- error=1
- fi
-
- # TODO: check pkg config file is utf8 format
-
- # check enable pkg icon file
- if [ ! -f "$PKG_CONTROL_DIR/$PKG_ICON_ENABLE_FILE" ]; then
- echo " *** Error: Package enable icon file $PKG_SRC_DIR/$PKG_CONTROL_DIR/$PKG_ICON_ENABLE_FILE not found." >&2
- error=1
- fi
-
- # check disable pkg icon file
- if [ ! -f "$PKG_CONTROL_DIR/$PKG_ICON_DISABLE_FILE" ]; then
- echo " *** Error: Package disable icon file $PKG_SRC_DIR/$PKG_CONTROL_DIR/$PKG_ICON_DISABLE_FILE not found." >&2
- error=1
- fi
-
- cd $owd
-
- return $error
-}
-
-required_field() {
- field=$1
-
- raw_value=`$JSON_GREP app $field < $PKG_CONTROL_DIR/$PKG_CONFIG_FILE`
- value=`expr "$raw_value" : '..\(.*\).'`
- if [ -z "$value" ]; then
- echo " *** Error: $PKG_CONTROL_DIR/$PKG_CONFIG_FILE is missing field $field" >&2
- return 1
- fi
- echo $value
- return 0
-}
-
-pkg_config_check() {
- local owd=`pwd`
- local error=0
-
- cd $PKG_SRC_DIR
-
- PKG_FIELD_PACKAGE=`required_field package`
- [ "$?" -ne 0 ] && error=1
-
- PKG_FIELD_NAME=`required_field name`
- [ "$?" -ne 0 ] && error=1
-
- PKG_FIELD_VERSION=`required_field version`
- [ "$?" -ne 0 ] && error=1
-
- PKG_FIELD_SECTION=`required_field section`
-# [ "$?" -ne 0 ] && error=1
-
- PKG_FIELD_VISIBILITY=`required_field visibility`
- [ "$?" -ne 0 ] && error=1
-
- PKG_FIELD_PRIORITY=`required_field priority`
- [ "$?" -ne 0 ] && error=1
-
- PKG_FIELD_MAINTAINER=`required_field maintainer`
- [ "$?" -ne 0 ] && error=1
-
- PKG_FIELD_EMAIL=`required_field email`
-# [ "$?" -ne 0 ] && error=1
-
- PKG_FIELD_WEBSITE=`required_field website`
-# [ "$?" -ne 0 ] && error=1
-
- PKG_FIELD_ARCHITECTURE=`required_field architecture`
- [ "$?" -ne 0 ] && error=1
-
- PKG_FIELD_FIRMWARE=`required_field firmware`
- [ "$?" -ne 0 ] && error=1
-
- PKG_FIELD_DESCRIPTION=`required_field description`
- [ "$?" -ne 0 ] && error=1
-
- PKG_FIELD_CHANGES=`required_field changes`
-# [ "$?" -ne 0 ] && error=1
-
-# PKG_FIELD_TAGS=`required_field tags`
-# [ "$?" -ne 0 ] && error=1
-
- if echo $PKG_FIELD_PACKAGE | grep '[^a-z0-9.+-]' > /dev/null 2>&1; then
- if [ $error -eq 1 ]; then
- echo >&2
- fi
- echo " *** Error: Package name $PKG_FIELD_PACKAGE contains illegal characters, (other than [a-z0-9.+-])" >&2
- error=1
- fi
-
-# if [ -z "$PKG_FIELD_SECTION" ]; then
-# if [ $error -eq 1 ]; then
-# echo >&2
-# fi
-# echo " The Section field should have one of the following values:" >&2
-# echo " admin, base, comm, editors, extras, games, graphics, kernel, libs, misc, net, text, web, x11" >&2
-# fi
-
- if [ -z "$PKG_FIELD_PRIORITY" ]; then
- if [ $error -eq 1 ]; then
- echo >&2
- fi
- echo " The Priority field should have one of the following values:" >&2
- echo " required, important, standard, optional, extra" >&2
- echo " If you don't know which priority value you should be using, then use \`optional'" >&2
-
- fi
-
- cd $owd
-
- return $error
-}
-
-pkg_script_check() {
- local owd=`pwd`
- local error=0
-
- cd $PKG_SRC_DIR
-
- for script_file in $PKG_SCRIPT_LIST; do
- if [ -f $PKG_CONTROL_DIR/$script_file -a ! -x $PKG_CONTROL_DIR/$script_file ]; then
- echo " *** Error: package script $PKG_CONTROL_DIR/$script_file is not executable" >&2
- error=1
- fi
- done
-
- cd $owd
-
- return $error
-}
-
-pkg_misc_check() {
- local owd=`pwd`
- local error=0
-
- cd $PKG_SRC_DIR
-
- tilde_files=`find . -name '*~'`
- if [ -n "$tilde_files" ]; then
- echo "*** Warning: The following files have names ending in '~'.
-You probably want to remove them: " >&2
- ls -ld $tilde_files
- echo >&2
- fi
-
- swap_files=`find . -name '*.swp'`
- if [ -n "$swap_files" ]; then
- echo "*** Warning: The following files have names ending in '.swp'.
-You probably want to remove them: " >&2
- ls -ld $swap_files
- echo >&2
- fi
-
- svn_files=`find . -name '.svn'`
- if [ -n "$svn_files" ]; then
- echo "*** Warning: The following files have names ending in '.svn'.
-You probably want to remove them: " >&2
- ls -ld $svn_files
- echo >&2
- fi
-
- git_files=`find . -name '*.git'`
- if [ -n "$git_files" ]; then
- echo "*** Warning: The following files have names ending in '.git'.
-You probably want to remove them: " >&2
- ls -ld $git_files
- echo >&2
- fi
-
- cvs_files=`find . -name '*.cvs'`
- if [ -n "$cvs_files" ]; then
- echo "*** Warning: The following files have names ending in '.cvs'.
-You probably want to remove them: " >&2
- ls -ld $cvs_files
- echo >&2
- fi
-
-# maybe check SUID & GUID file
-
-# large_uid_files=`find . -uid +99`
-# if [ -n "$large_uid_files" ]; then
-# echo "*** Warning: The following files have a UID greater than 99.
-#You probably want to chown these to a system user: " >&2
-# ls -ld $large_uid_files
-# echo >&2
-# fi
-
- cd $owd
-
- return $error
-}
-
-###
-# apkg-build "main"
-###
-
-# set pkg dest dir
-case $# in
-1)
- PKG_SRC_DIR=`readlink -f $PKG_SRC_DIR`
- PKG_DEST_DIR=$THIS_DIR
- ;;
-2)
- PKG_SRC_DIR=`readlink -f $PKG_SRC_DIR`
- PKG_DEST_DIR=`readlink -f $PKG_DEST_DIR`
- ;;
-*)
- echo "Usage: $PKG_BUILD_PROGRAM []" >&2
- exit 1
- ;;
-esac
-
-if [ $PKG_SRC_DIR = $PKG_DEST_DIR ]; then
- echo "*** Error: Can't not build pkg in the same directory" >&2
- echo " pkg_directory: $PKG_SRC_DIR" >&2
- echo " destination_directory: $PKG_DEST_DIR" >&2
- exit 1
-fi
-
-# check pkg package folder structure
-echo "Check package folder structure..."
-if ! pkg_struct_check; then
- echo >&2
- echo "$PKG_BUILD_PROGRAM: Please fix the above errors and try again." >&2
- exit 1
-fi
-echo "Done"
-
-echo
-
-# check pkg config
-echo "Check package config information..."
-if ! pkg_config_check; then
- echo >&2
- echo "$PKG_BUILD_PROGRAM: Please fix the above errors and try again." >&2
- exit 1
-fi
-echo "Done"
-
-echo
-
-# check pkg script
-echo "Check package script file..."
-if ! pkg_script_check; then
- echo >&2
- echo "$PKG_BUILD_PROGRAM: Please fix the above errors and try again." >&2
- exit 1
-fi
-echo "Done"
-
-echo
-
-# check pkg misc
-echo "Check package misc..."
-if ! pkg_misc_check; then
- echo >&2
- echo "$PKG_BUILD_PROGRAM: Please fix the above errors and try again." >&2
- exit 1
-fi
-echo "Done"
-
-echo
-
-# archive pkg control script
-mkdir -p $PKG_TMP_DIR
-
-# force chown user:group to web folder
-if [ -d $PKG_SRC_DIR/$PKG_WEB_DIR ]; then
- echo -n "Force change $PKG_SRC_DIR/$PKG_WEB_DIR/* owner and group to $PKG_WEB_USER:$PKG_WEB_GROUP ... "
- if [ `ls -la $PKG_SRC_DIR/$PKG_WEB_DIR | wc -l` -gt 3 ]; then
- # change owner
- sudo chown $PKG_WEB_USER_ID:$PKG_WEB_GROUP_ID $PKG_SRC_DIR/$PKG_WEB_DIR -R
- # TODO change file permission
- # chmod $PKG_WEB_PERM $PKG_SRC_DIR/$PKG_WEB_DIR -R
- fi
- echo "Done"
-
- echo
-fi
-
-echo -n "Archive package data..."
-tar -C $PKG_SRC_DIR -czf $PKG_TMP_DIR/$PKG_DATA_FILE . --exclude=$PKG_CONTROL_DIR
-echo "Done"
-
-echo
-
-# archive pkg data
-echo -n "Archive package control script..."
-tar -C $PKG_SRC_DIR/$PKG_CONTROL_DIR -czf $PKG_TMP_DIR/$PKG_CONTROL_FILE .
-echo "Done"
-
-echo
-
-# generate pkg version
-echo -n "Generate $PKG_VERSION_FILE..."
-echo $PKG_BUILD_VER > $PKG_TMP_DIR/$PKG_VERSION_FILE
-echo "Done"
-
-echo
-
-# prepare pkg filename
-PKG_ARCHIVE_FILE=${PKG_FIELD_PACKAGE}_${PKG_FIELD_VERSION}_${PKG_FIELD_ARCHITECTURE}.$PKG_SUFFIX
-
-# use which type archive
-echo "Use $PKG_BUILD_FORMAT format to archive $PKG_ARCHIVE_FILE..."
-cd $PKG_TMP_DIR
-
-PKG_ARCHIVE_LIST="./$PKG_VERSION_FILE ./$PKG_DATA_FILE ./$PKG_CONTROL_FILE"
-
-rm -rf $TMP_DIR/$PKG_ARCHIVE_FILE
-
-if [ "$PKG_BUILD_FORMAT" = "ar" ] ; then
- ar -crvf $TMP_DIR/$PKG_ARCHIVE_FILE $PKG_ARCHIVE_LIST
-elif [ "$PKG_BUILD_FORMAT" = "tar" ] ; then
- tar -zcvf $TMP_DIR/$PKG_ARCHIVE_FILE $PKG_ARCHIVE_LIST
-elif [ "$PKG_BUILD_FORMAT" = "zip" ] ; then
- zip -r $TMP_DIR/$PKG_ARCHIVE_FILE $PKG_ARCHIVE_LIST
-fi
-echo "Done"
-
-PKG_SIZE=`ls -l $TMP_DIR/$PKG_ARCHIVE_FILE | awk '{print $5}'`
-PKG_MD5=`md5sum $TMP_DIR/$PKG_ARCHIVE_FILE | cut -d' ' -f1`
-PKG_SHA1=`sha1sum $TMP_DIR/$PKG_ARCHIVE_FILE | cut -d' ' -f1`
-
-# move pkg to dest dir
-[ "$PKG_DEST_DIR" != "$TMP_DIR" ] && mkdir -p $PKG_DEST_DIR && mv $TMP_DIR/$PKG_ARCHIVE_FILE $PKG_DEST_DIR
-
-echo
-
-# clean up
-echo -n "Clean building data..."
-rm -f $PKG_TMP_DIR/$PKG_VERSION_FILE $PKG_TMP_DIR/$PKG_DATA_FILE $PKG_TMP_DIR/$PKG_CONTROL_FILE
-rmdir $PKG_TMP_DIR
-echo "Done"
-
-echo
-
-echo "Package Summary"
-echo " Source: $PKG_SRC_DIR"
-echo " Destination: $PKG_DEST_DIR"
-echo " Package: $PKG_FIELD_PACKAGE"
-echo " Name: $PKG_FIELD_NAME"
-echo " Version: $PKG_FIELD_VERSION"
-echo " Section: $PKG_FIELD_SECTION"
-echo " Visibility: $PKG_FIELD_VISIBILITY"
-echo " Priority: $PKG_FIELD_PRIORITY"
-echo " Maintainer: $PKG_FIELD_MAINTAINER"
-echo " Email: $PKG_FIELD_EMAIL"
-echo " WebSite: $PKG_FIELD_WEBSITE"
-echo " Architecture: $PKG_FIELD_ARCHITECTURE"
-echo " Firmware: $PKG_FIELD_FIRMWARE"
-echo " Description: $PKG_FIELD_DESCRIPTION"
-echo " Changes: $PKG_FIELD_CHANGES"
-echo " File: $PKG_ARCHIVE_FILE"
-echo " Size: $PKG_SIZE"
-echo " MD5sum: $PKG_MD5"
-echo " SHA1sum: $PKG_SHA1"
diff --git a/misc/package/ASUStor/build.sh b/misc/package/ASUStor/build.sh
deleted file mode 100644
index 06d6d9e74f7..00000000000
--- a/misc/package/ASUStor/build.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-
-LATEST=`curl -s http://api.piwik.org/1.0/getLatestVersion/`
-curl -s http://builds.piwik.org/piwik-$LATEST.tar.gz | gunzip | tar xf -
-
-mkdir -p Piwik/CONTROL
-mv piwik Piwik/www
-
-sed "s/{{VERSION}}/$LATEST/" Piwik/CONTROL/config.json
-cp ../../gpl-3.0.txt Piwik/CONTROL/license.txt
-cp CONTROL/*.png Piwik/CONTROL/
-
-sh apkg_build Piwik
diff --git a/misc/package/ASUStor/config.json.tpl b/misc/package/ASUStor/config.json.tpl
deleted file mode 100644
index 9062331e3d6..00000000000
--- a/misc/package/ASUStor/config.json.tpl
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "app":{
- "package":"piwik",
- "name":"Piwik",
- "version":"{{VERSION}}",
- "section":"Web Hosting",
- "visibility":true,
- "priority":"optional",
- "depends":[],
- "conflicts":[],
- "suggests":[],
- "maintainer":"Piwik",
- "email":"hello@piwik.org",
- "website":"http://piwik.org/",
- "architecture":"any",
- "firmware":"any",
- "description":"Open source, self-hosted web analytics.",
- "changes":"http://piwik.org/changelog/",
- "tags":["analytics", "visits", "visitors", "hits"]
- },
- "desktop":{
- "icon":{
- "type":"webserver",
- "title":"Piwik"
- },
- "privilege":{
- "accessible":"users",
- "customizable":true
- }
- },
- "install":{
- "dep-service":{
- "start":["httpd", "mysql"],
- "restart":[]
- }
- }
-}
diff --git a/misc/package/ASUStor/jsongrep.py b/misc/package/ASUStor/jsongrep.py
deleted file mode 100644
index 7b1b4713a01..00000000000
--- a/misc/package/ASUStor/jsongrep.py
+++ /dev/null
@@ -1,37 +0,0 @@
-#Original author: Terry Jones (http://blogs.fluidinfo.com/terry/about/)
-#Source: http://blogs.fluidinfo.com/terry/2010/11/25/jsongrep-py-python-for-extracting-pieces-of-json-objects/
-
-#!/usr/bin/env python
-
-import sys
-import re
-import json
-from pprint import pprint
-
-def jsongrep(d, patterns):
- try:
- pattern = patterns.pop(0)
- except IndexError:
- pprint(d)
- else:
- if isinstance(d, dict):
- keys = filter(pattern.match, d.keys())
- elif isinstance(d, list):
- keys = map(int,
- filter(pattern.match,
- ['%d' % i for i in range(len(d))]))
- else:
- if pattern.match(str(d)):
- pprint(d)
- return
- for item in (d[key] for key in keys):
- jsongrep(item, patterns[:])
-
-if __name__ == '__main__':
- try:
- j = json.loads(sys.stdin.read())
- except ValueError, e:
- print >>sys.stderr, 'Could not load JSON object from stdin.'
- sys.exit(1)
-
- jsongrep(j, map(re.compile, sys.argv[1:]))
diff --git a/misc/package/QNAP/build.sh b/misc/package/QNAP/build.sh
deleted file mode 100644
index 0ef74e21c7b..00000000000
--- a/misc/package/QNAP/build.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-LATEST=`curl -s http://api.piwik.org/1.0/getLatestVersion/`
-curl -s http://builds.piwik.org/piwik-$LATEST.tar.gz | gunzip | tar xf -
-
-cp icons/qpkg_icon_80.gif piwik/.qpkg_icon_80.gif
-cp icons/qpkg_icon.gif piwik/.qpkg_icon.gif
-cp icons/qpkg_icon_gray.gif piwik/.qpkg_icon_gray.gif
-
-tar cf - piwik | gzip >Piwik.tgz
-
-sed "s/{{VERSION}}/$LATEST/" qpkg.cfg
-
-cp header.qpkg Piwik_$LATEST.qpkg
-tar zcf - qinstall.sh Piwik.tgz qpkg.cfg >>Piwik_$LATEST.qpkg
-
-zip Piwik_$LATEST.zip Piwik_$LATEST.qpkg
diff --git a/misc/package/QNAP/header.qpkg b/misc/package/QNAP/header.qpkg
deleted file mode 100644
index 7a143ecd195..00000000000
--- a/misc/package/QNAP/header.qpkg
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-/bin/echo "Install QNAP package on TS-NAS ..."
-/bin/grep "/mnt/HDA_ROOT" /proc/mounts 1>>/dev/null 2>>/dev/null
-[ $? = 0 ] || return 1
-[ -d /mnt/HDA_ROOT/update_pkg/tmp ] || /bin/mkdir -p /mnt/HDA_ROOT/update_pkg/tmp
-/bin/dd if=${0} bs=487 skip=1 | /bin/tar zxv -C /mnt/HDA_ROOT/update_pkg/tmp
-[ $? = 0 ] || return 1
-cd /mnt/HDA_ROOT/update_pkg/tmp && ( /bin/sh qinstall.sh || echo "Installation Abort." ) && cd .. && /bin/rm -rf /mnt/HDA_ROOT/update_pkg/tmp && exit 10
-exit 1
diff --git a/misc/package/QNAP/icons/qpkg_icon.gif b/misc/package/QNAP/icons/qpkg_icon.gif
deleted file mode 100755
index eec1713ce2148afe1d2410b1131125da2218bb23..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 4617
zcmbVPc|4Ts+aEI+yFr{38H1ECGmJGf!_Xwlq)urc%XI8B7!jQsREBI(QK>AEHd>Ih
z7_zTp8)F~L*kvpsWZrSk>AdeBzt8WF_x|H~?)$#3>-)X7`}5q-!9#YYW^QNz8n6NY
zEG{mxSghXO-u~uyqugm8^X=^XLVJ6AadC0)@OY4j==0~#H%7wy`}_MG96D>N84L!K
z#jYzU+57-}ck|}myLa(;{Mf{FNp4bjc=%=wV4VioyaO7a`94QKnC9%9ot?F@u`#>!
zb7^Vm1`@fpwnjO3uKH~n3WZwc+?`ol<0kKJX=z!%uUJ`GnVXy285K1$GBU{>C@U-D
zcUX?~Rc^A)7FwLztM0|b#EeZYERNK!tgIwo#i^*M^mcd8Opf&CQyQB)mOlqp<;(aw
zJM*h`R##UypBt^cJvcG-ZS(ow6ChAXNXS4}({fLmySw|;7$=HE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G
z_CzC7kJRc_xBbSLH#rgSIsg#COG40HF}{
zos+Y6BdJ3hx3n(-O{sUm5%;vk=jm4%p#UHcsKf?pK!DQ8LP~6j?A;f~w5gQtkON?f
zO>Lwt_@Yc&Xu9@ABtfVGFP_Vj-NcLTNd~R*+)i~zifWsRy%*1U9Z;A;*6I!zHV|(_
zQ$k~86{$cdLl$@h2!Y600e}F2@uvmNoOaoh3+g5d>fi;xf+%<*06=7e90?+))FCGk
zAUqp{5R+E|LVpg+9*EK*Z`a;ABCA0VS7d{fsDO1eM4cc@B;VLWmR_NQZXKcJl4&$o
z33UiCu8tN%E2Sl-(^6a|uDixsuw(YHL5tmD`*4t4x|ktE<{mAkf+3t27N^V*R(>7#
zk`-658uv0k?rB(D1wqJ)4cfyHCNjjd7?9OuiEeacPT0*V*Z7*S_`3A?8X8cEAq+=|
st}|lA0%IWvkR)5CCmG*cn$XWm7+g*0O_x4KmNq1aM0-JmgaG^h2YAJNT>t<8
diff --git a/misc/package/QNAP/icons/qpkg_icon_80.gif b/misc/package/QNAP/icons/qpkg_icon_80.gif
deleted file mode 100755
index 43fefcb95f463b270fa02f1c9640b58153626ef6..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 5737
zcmbVOc|4SD+rDQ;%#39Qks=LBb~E;|Wz1A4OtdNWSc_z7OeJ}02HDe)?8{gZl0?~`
z8i^z_vdsvMee6RBExze_pWg5L=XGAc>ppCK$O!971c<;_
z09fwvURhaLUS5uii~C-z|DA6Yb{{`}-1tjyn%(#E<;!?Oqw;vcfq{X+!9nia3WLFT
zU-Oj7WVW`puC>Sd32Ymim~CsW`W^=wtT9@z_uSan$jQlhU~4KcKTW{l@Gre3k5h>&Y@4vKFxK-pD=VwxFxcC-
zZ`<43yR))598R#Z^7QmAl>Yikb+3eKNDS6Nv(R#H+H9X&TX
z#_sLz@fTwCwEFn?boYLq=dF&6PqHd)7I;gIan3XvZ6;cpH`(+pLwblaF~c1zyB_p?
z*txDOX=vc%$j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q;prHP&wuF|GK@{j;*1o9OC$pPTi%@;BC
zHF2M6;=k3uZD^5gI6#9`qXbJih}4@%5C|~&
EALVyq2LJ#7
diff --git a/misc/package/QNAP/icons/qpkg_icon_gray.gif b/misc/package/QNAP/icons/qpkg_icon_gray.gif
deleted file mode 100755
index 7efe51ce9d257431769c1ffb403d1a9dd87e27ef..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 3672
zcmchW`6JW+(P8jcZ(#sKY)JRb&Q#n%+4bz*~Hn|dWU&Ta`
zE^m=;o1{ZDC0Ex{q29e~>C)-@{`?c)$3O7+--Z?dkMKI0i8AbsW5W`Eq7v=EH{%
zQ&UqTBO?({TLp`jy3j$FHT?d#XChYugVdi82e
zP0juL_rHJtUR_=N;K75Aj*f5Nz5xJEpFS-R2!ujme}DhQix)F9Gn<>6j~zQE5{dTj
z-~Z#skJ;JTlP6DJxpGA=m!CRy>du`zIF9%A^<`vaoIQKCv$M0Qsp-az8-s&`ckkZ)
z`|rQcoH=v+`0;^(f$P_=S5{VDxNxDnyZik4^R2C|QmHg9F0P`YqOhn|%StDKx148z*m+GH|WV`F1WOUuE7
z2h-Ej3knMA>gvkM%2HBN^7HdIY}kMxh*&J%w{M@bv$LO{pPruH_U+qKQ&TTrzMPhp
z77!4?<#M-e+qQP?T3=t^?Ck8DH*d1p?AqGekdP1#hf`Ekv|_~yV`F29L}FuOvuV?&
z#fuj&S+Yc5Uw`@X!_%xq@*NWUEOu-
z)~#H*GB!4rN~LOPX>HuN(az4!+}zy7#bx*I-SP49mX?+g5fLbg*4NkP=H?Ozgq=Hg
zIygA^`};dNIXOBy+S=N#UcGwWym?t!SqBar(9zM^yLYd;x_V+_BA?HH~;?o@4I*J-oAbNUvmE?@&AeO
zHv$B}II#Sm^nXtP@*L=(7<#u#WFoSbd1$j35oOa&d=7j6J>fo2O@ndksB9ps5Oo*+
z#M&Bft1k*{3Cb;gMKWZ@TlO{Y+NeRK?0xh2_PM5eb${A^vXt*Q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INSTALL_MSG" != "x" ];then
- $CMD_WLOG "${QPKG_INSTALL_MSG}" 1
- else
- $CMD_WLOG "${QPKG_NAME} ${QPKG_VER} installation failed" 1
- fi
- $CMD_ECHO -1 > ${UPDATE_PROCESS}
- ;;
- esac
-
- exit $ret
-}
-
-pre_update()
-{
- TMP_DIR=/tmp
- $CMD_CP -af $QPKG_CONFIG_PATH $TMP_DIR
-}
-
-post_update()
-{
- $CMD_CP -af "${TMP_DIR}/config.ini.php" ${QPKG_CONFIG_PATH}
-}
-
-install()
-{
- TMP=`$CMD_READLINK $QPKG_INSTALL_PATH`
- UPDATE_FLAG=0
- if [ -f "${QPKG_SOURCE_DIR}/${QPKG_SOURCE_FILE}" ]; then
- if [ -d ${QPKG_DIR} ]; then
- CURRENT_QPKG_VER="`/sbin/getcfg ${QPKG_NAME} Version -f /etc/config/qpkg.conf`"
- QPKG_INSTALL_MSG="${QPKG_NAME} ${QPKG_VER} is already installed. Setup will now perform package upgrading."
- $CMD_ECHO "$QPKG_INSTALL_MSG"
- UPDATE_FLAG=1
- fi
-
- $CMD_ECHO "$UPDATE_P1" > ${UPDATE_PROCESS}
- if [ $UPDATE_FLAG -eq 0 ]; then
- $CMD_ECHO "Install ${QPKG_NAME} ..."
- [ ! -d $QPKG_DIR ] || $CMD_RM -rf $QPKG_DIR
- else
- pre_update
- fi
-
- #install QPKG files
- $CMD_TAR xzf "${QPKG_SOURCE_DIR}/${QPKG_SOURCE_FILE}" -C $QPKG_INSTALL_PATH
- if [ $? = 0 ]; then
- # restore backups
- if [ ${UPDATE_FLAG} -eq 1 ]; then
- post_update
- else
- $CMD_CHMOD 0777 "${QPKG_DIR}"
- $CMD_CHMOD 0777 -R "${QPKG_DIR}/config"
- $CMD_CHMOD 0777 -R "${QPKG_DIR}/tmp"
-
- $CMD_MKDIR -p ${QPKG_DIR}/tmp/{sessions, templates_c, cache, assets, latest, tcpdf}
- $CMD_CHMOD 0777 -R "${QPKG_DIR}/tmp/"
- fi
-
- chown httpdusr.everyone ${QPKG_DIR} -R
-
- $CMD_ECHO "$UPDATE_P2" > ${UPDATE_PROCESS}
- else
- ${CMD_RM} -rf ${QPKG_DIR}
- QPKG_INSTALL_MSG="${QPKG_NAME} ${QPKG_VER} installation failed. ${QPKG_SOURCE_DIR}/${QPKG_SOURCE_FILE} file error."
- $CMD_ECHO "$QPKG_INSTALL_MSG"
- _exit 1
- fi
-
- # set QPKG information to $SYS_QPKG_CONFIG_FILE
- $CMD_ECHO "Set QPKG information to $SYS_QPKG_CONFIG_FILE"
- [ -f ${SYS_QPKG_CONFIG_FILE} ] || $CMD_TOUCH ${SYS_QPKG_CONFIG_FILE}
- $CMD_SETCFG ${QPKG_NAME} ${SYS_QPKG_CONF_FIELD_NAME} "${QPKG_NAME}" -f ${SYS_QPKG_CONFIG_FILE}
- $CMD_SETCFG ${QPKG_NAME} ${SYS_QPKG_CONF_FIELD_VERSION} "${QPKG_VER}" -f ${SYS_QPKG_CONFIG_FILE}
-
- #default value to activate(or not) your QPKG if it was a service/daemon
- $CMD_SETCFG ${QPKG_NAME} ${SYS_QPKG_CONF_FIELD_ENABLE} "UNKNOWN" -f ${SYS_QPKG_CONFIG_FILE}
-
- #set the qpkg file name
- [ "x${SYS_QPKG_CONF_FIELD_QPKGFILE}" = "x" ] || $CMD_SETCFG ${QPKG_NAME} ${SYS_QPKG_CONF_FIELD_QPKGFILE} "${QPKG_QPKG_FILE}" -f ${SYS_QPKG_CONFIG_FILE}
-
- #set the date of installation
- $CMD_SETCFG ${QPKG_NAME} ${SYS_QPKG_CONF_FIELD_DATE} `date +%F` -f ${SYS_QPKG_CONFIG_FILE}
-
- #set the path of start/stop shell script
- [ "x${QPKG_SERVICE_PROGRAM}" = "x" ] || $CMD_SETCFG ${QPKG_NAME} ${SYS_QPKG_CONF_FIELD_SHELL} "${QPKG_DIR}/${QPKG_SERVICE_PROGRAM}" -f ${SYS_QPKG_CONFIG_FILE}
-
- #set path where the QPKG installed
- $CMD_SETCFG ${QPKG_NAME} ${SYS_QPKG_CONF_FIELD_INSTALL_PATH} "${QPKG_DIR}" -f ${SYS_QPKG_CONFIG_FILE}
-
- #set path where the QPKG configure directory/file is
- [ "x${QPKG_CONFIG_PATH}" = "x" ] || $CMD_SETCFG ${QPKG_NAME} ${SYS_QPKG_CONF_FIELD_CONFIG_PATH} "${QPKG_CONFIG_PATH}" -f ${SYS_QPKG_CONFIG_FILE}
-
- #set the port number if your QPKG was a service/daemon and needed a port to run.
- [ "x${QPKG_SERVICE_PORT}" = "x" ] || $CMD_SETCFG ${QPKG_NAME} ${SYS_QPKG_CONF_FIELD_SERVICEPORT} "${QPKG_SERVICE_PORT}" -f ${SYS_QPKG_CONFIG_FILE}
-
- #set the port number if your QPKG was a service/daemon and needed a port to run.
- [ "x${QPKG_WEB_PORT}" = "x" ] || $CMD_SETCFG ${QPKG_NAME} ${SYS_QPKG_CONF_FIELD_WEBPORT} "${QPKG_WEB_PORT}" -f ${SYS_QPKG_CONFIG_FILE}
-
- #set the URL of your QPKG Web UI if existed.
- [ "x${QPKG_WEBUI}" = "x" ] || $CMD_SETCFG ${QPKG_NAME} ${SYS_QPKG_CONF_FIELD_WEBUI} "${QPKG_WEBUI}" -f ${SYS_QPKG_CONFIG_FILE}
-
- #Sign up
- [ "x${QPKG_AUTHOR}" = "x" ] && $CMD_ECHO "Warning: ${SYS_QPKG_CONF_FIELD_AUTHOR} is not specified!!"
- [ "x${QPKG_AUTHOR}" = "x" ] || $CMD_SETCFG ${QPKG_NAME} ${SYS_QPKG_CONF_FIELD_AUTHOR} "${QPKG_AUTHOR}" -f ${SYS_QPKG_CONFIG_FILE}
-
- $CMD_SYNC
- QPKG_INSTALL_MSG="$QPKG_NAME ${QPKG_VER} has been installed in $QPKG_DIR."
- $CMD_ECHO "$QPKG_INSTALL_MSG"
- _exit 0
- else
- QPKG_INSTALL_MSG="${QPKG_NAME} ${QPKG_VER} installation failed. ${QPKG_SOURCE_DIR}/${QPKG_SOURCE_FILE} file not found."
- $CMD_ECHO "$QPKG_INSTALL_MSG"
- _exit 1
- fi
-}
-
-##### Main #####
-
-$CMD_ECHO "$UPDATE_PB" > ${UPDATE_PROCESS}
-install
diff --git a/misc/package/QNAP/qpkg.cfg.tpl b/misc/package/QNAP/qpkg.cfg.tpl
deleted file mode 100644
index a97631cbb12..00000000000
--- a/misc/package/QNAP/qpkg.cfg.tpl
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/sh
-#================================================================
-# Copyright (C) 2010 QNAP Systems, Inc.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#----------------------------------------------------------------
-#
-# qpkg_all.cfg
-#
-# Abstract:
-# A QPKG configuration file for
-# Piwik v1.0
-#
-# HISTORY:
-# 2010/11/05 - Created - AndyChuo (zeonism at gmail dot com)
-# 2012/07/28 - Modified - Anthon Pang (anthon at piwik dot org)
-#
-#================================================================
-QPKG_AUTHOR="QNAP Systems, Inc."
-QPKG_SOURCE_DIR="."
-QPKG_QPKG_FILE="Piwik.qpkg"
-QPKG_SOURCE_FILE="Piwik.tgz"
-QPKG_NAME="Piwik"
-QPKG_VER="{{VERSION}}"
-QPKG_MAJOR_VER="1"
-QPKG_MINOR_VER="0"
-QPKG_TYPE="Web Applications"
-QPKG_LOG_PATH=""
-QPKG_INSTALL_PATH="/share/${WEB_SHARE}"
-QPKG_CONFIG_PATH="$QPKG_INSTALL_PATH/piwik/config/config.ini.php"
-QPKG_DIR="$QPKG_INSTALL_PATH/piwik"
-QPKG_WEBUI="/piwik/" #URL relative path of your QPKG web interface led by "/"
-QPKG_INSTALL_MSG=""
-QPKG_WEB_PORT=""
-QPKG_SERVICE_PORT=""
From ef3f037e96fed8fd711843811abc2601de14c2fe Mon Sep 17 00:00:00 2001
From: mattab
Date: Tue, 10 Jun 2014 12:45:44 +1200
Subject: [PATCH 12/36] Piwik is a free/libre analytics platform. Refs #5276
---
README.md | 4 ++--
composer.json | 2 +-
plugins/CustomAlerts | 2 +-
plugins/ExampleAPI/API.php | 2 +-
plugins/SecurityInfo | 2 +-
plugins/TasksTimetable | 2 +-
plugins/TreemapVisualization | 2 +-
plugins/VisitorGenerator | 2 +-
tests/PHPUnit/Fixtures/InvalidVisits.php | 2 +-
9 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/README.md b/README.md
index 8c12c5a0636..b6268294986 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,8 @@
# Piwik - piwik.org
-## We’re seeking a talented open source Software Engineer!
+## We’re seeking a talented Software Engineer
-Are you looking for a new challenge? We are currently seeking a software engineer or software developer who is passionate about data processing, security, privacy, the open source philosophy and usable interface design.
+Are you looking for a new challenge? We are currently seeking a software engineer or software developer who is passionate about data processing, security, privacy, the open source and free/libre philosophy and usable interface design.
[View Job Description](http://piwik.org/blog/2014/05/piwik-expanding-seeking-talented-software-engineer-new-zealand-poland/) - [Apply online](http://piwik.org/jobs/)
diff --git a/composer.json b/composer.json
index 0cfa4c9f062..de87087718e 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,7 @@
{
"name": "piwik/piwik",
"type": "application",
- "description": "Open Source Real Time Web Analytics Platform",
+ "description": "the leading free/libre analytics platform",
"keywords": ["piwik","web","analytics"],
"homepage": "http://piwik.org",
"license": "GPL-3.0+",
diff --git a/plugins/CustomAlerts b/plugins/CustomAlerts
index 495cf80c13b..defaa73836a 160000
--- a/plugins/CustomAlerts
+++ b/plugins/CustomAlerts
@@ -1 +1 @@
-Subproject commit 495cf80c13b16ef80f9871d31d859abd955540bb
+Subproject commit defaa73836af7da37bff85c74de336ff6b1edcdd
diff --git a/plugins/ExampleAPI/API.php b/plugins/ExampleAPI/API.php
index 19a446d17a2..27dc2f59aaf 100644
--- a/plugins/ExampleAPI/API.php
+++ b/plugins/ExampleAPI/API.php
@@ -87,7 +87,7 @@ public function getNull()
*/
public function getDescriptionArray()
{
- return array('piwik', 'open source', 'web analytics', 'free', 'Strong message: Свободный Тибет');
+ return array('piwik', 'free/libre', 'web analytics', 'free', 'Strong message: Свободный Тибет');
}
/**
diff --git a/plugins/SecurityInfo b/plugins/SecurityInfo
index e3db81b6e55..bc73711df83 160000
--- a/plugins/SecurityInfo
+++ b/plugins/SecurityInfo
@@ -1 +1 @@
-Subproject commit e3db81b6e557f9ca6b9ace64be505f9dd1a9a7c9
+Subproject commit bc73711df837a1cda2de8d8634b9c4e13997b1e4
diff --git a/plugins/TasksTimetable b/plugins/TasksTimetable
index a98ff9e692c..8abb4ee4c2d 160000
--- a/plugins/TasksTimetable
+++ b/plugins/TasksTimetable
@@ -1 +1 @@
-Subproject commit a98ff9e692c3bda601cb269673897decce39a4f3
+Subproject commit 8abb4ee4c2dd3ccd6e16667a51e0d2ac26af66a7
diff --git a/plugins/TreemapVisualization b/plugins/TreemapVisualization
index b54a6601a52..2a064c773c8 160000
--- a/plugins/TreemapVisualization
+++ b/plugins/TreemapVisualization
@@ -1 +1 @@
-Subproject commit b54a6601a52071198b8560335869b57d91452431
+Subproject commit 2a064c773c8eef17655f5d2ddb626294c1ee029f
diff --git a/plugins/VisitorGenerator b/plugins/VisitorGenerator
index 240f1deff36..17e3ebd3efa 160000
--- a/plugins/VisitorGenerator
+++ b/plugins/VisitorGenerator
@@ -1 +1 @@
-Subproject commit 240f1deff367ef1c19d065f259311865db7e161a
+Subproject commit 17e3ebd3efab0bb489b0621cb45b88f693a71f6b
diff --git a/tests/PHPUnit/Fixtures/InvalidVisits.php b/tests/PHPUnit/Fixtures/InvalidVisits.php
index 8d849b31b1b..75015a07669 100644
--- a/tests/PHPUnit/Fixtures/InvalidVisits.php
+++ b/tests/PHPUnit/Fixtures/InvalidVisits.php
@@ -52,7 +52,7 @@ private function trackVisits()
// Trigger empty request
$trackerUrl = self::getTrackerUrl();
$response = Http::fetchRemoteFile($trackerUrl);
- self::assertTrue(strpos($response, 'is a free open source web') !== false, 'Piwik empty request response not correct: ' . $response);
+ self::assertTrue(strpos($response, 'is a free/libre web') !== false, 'Piwik empty request response not correct: ' . $response);
$t = self::getTracker($idSite, $dateTime, $defaultInit = true);
From fc3eeee485eb85de42b714fc8a4a0b81773f048a Mon Sep 17 00:00:00 2001
From: mattab
Date: Tue, 10 Jun 2014 12:56:09 +1200
Subject: [PATCH 13/36] MIT licenses -> MIT (Expat) Refs #5276
---
LEGALNOTICE | 27 +++++++++++++--------------
1 file changed, 13 insertions(+), 14 deletions(-)
diff --git a/LEGALNOTICE b/LEGALNOTICE
index 614c1901fba..f6ad6267c96 100644
--- a/LEGALNOTICE
+++ b/LEGALNOTICE
@@ -77,40 +77,40 @@ THIRD-PARTY COMPONENTS AND LIBRARIES
Name: jqPlot
Link: http://www.jqplot.com/
- License: Dual-licensed: MIT or GPL v2
+ License: Dual-licensed: MIT (Expat) or GPL v2
Name: jQuery
Link: http://jquery.com/
- License: Dual-licensed: MIT or GPL
+ License: Dual-licensed: MIT (Expat) or GPL
Notes:
- GPL version not explicitly stated in source but GPL v2 is in git
- - includes Sizzle.js - multi-licensed: MIT, New BSD, or GPL [v2]
+ - includes Sizzle.js - multi-licensed: MIT (Expat), New BSD, or GPL [v2]
Name: jQuery UI
Link: http://jqueryui.com/
- License: Dual-licensed: MIT or GPL
+ License: Dual-licensed: MIT (Expat) or GPL
Notes:
- GPL version not explicitly stated in source but GPL v2 is in git
Name: jquery.history
Link: http://tkyk.github.com/jquery-history-plugin/
- License: MIT
+ License: MIT (Expat)
Name: jquery.scrollTo
Link: http://plugins.jquery.com/project/ScrollTo
- License: Dual licensed: MIT or GPL
+ License: Dual licensed: MIT (Expat) or GPL
Name: jquery Tooltip
Link: http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/
- License: Dual licensed: MIT or GPL
+ License: Dual licensed: MIT (Expat) or GPL
Name: jquery placeholder
Link: http://mths.be/placeholder
- License: Dual licensed: MIT or GPL
+ License: Dual licensed: MIT (Expat) or GPL
Name: jquery smartbanner
Link: https://github.com/jasny/jquery.smartbanner
- License: Dual licensed: MIT
+ License: Dual licensed: MIT (Expat)
Name: json2.js
Link: http://json.org/
@@ -206,19 +206,19 @@ THIRD-PARTY COMPONENTS AND LIBRARIES
Name: Raphaël - JavaScript Vector Library
Link: http://raphaeljs.com/
- License: MIT
+ License: MIT (Expat)
Name: lessphp
Link: http://leafo.net/lessphp
- License: GPL3/MIT
+ License: GPL3, MIT (Expat)
Name: Symfony Console Component
Link: https://github.com/symfony/Console
- License: MIT
+ License: MIT (Expat)
Name: AngularJS
Link: https://github.com/angular/angular.js
- License: MIT
+ License: MIT (Expat)
Name: Mousetrap
Link: https://github.com/ccampbell/mousetrap
@@ -267,7 +267,6 @@ THIRD-PARTY CONTENT
Notes:
- the "New BSD" license refers to either the "Modified BSD" and "Simplified BSD"
licenses (2- or 3-clause), which are GPL compatible.
-- the "MIT" license is also referred to as the "X11" license
- icons for browsers, operating systems, browser plugins, search engines, and
and flags of countries are nominative use of third-party trademarks when
referring to the corresponding product or entity
From 66568338216c261668a871e1e41a28c9e755bda8 Mon Sep 17 00:00:00 2001
From: mattab
Date: Tue, 10 Jun 2014 13:35:51 +1200
Subject: [PATCH 14/36] Adding LibreJS license information in piwik.js Fixes
#3770 #5276
https://www.gnu.org/software/librejs/free-your-javascript.html#magnet-link-license
---
js/piwik.js | 7 +++++--
piwik.js | 7 +++++--
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/js/piwik.js b/js/piwik.js
index 09f00bf561a..4f0152698ab 100644
--- a/js/piwik.js
+++ b/js/piwik.js
@@ -5,9 +5,9 @@
*
* @link http://piwik.org
* @source https://github.com/piwik/piwik/blob/master/js/piwik.js
- * @license http://piwik.org/free-software/bsd/ Simplified BSD (also in js/LICENSE.txt)
+ * @license http://piwik.org/free-software/bsd/ BSD-3 Clause (also in js/LICENSE.txt)
+ * @license magnet:?xt=urn:btih:c80d50af7d3db9be66a4d0a86db0286e4fd33292&dn=bsd-3-clause.txt BSD-3-Clause
*/
-
// Refer to README.md for build instructions when minifying this file for distribution.
/*
@@ -3296,3 +3296,6 @@ if (typeof piwik_log !== 'function') {
}
};
}
+
+/*! @license-end */
+
diff --git a/piwik.js b/piwik.js
index a8de8850446..e2bd430f8f2 100644
--- a/piwik.js
+++ b/piwik.js
@@ -5,7 +5,8 @@
*
* @link http://piwik.org
* @source https://github.com/piwik/piwik/blob/master/js/piwik.js
- * @license http://piwik.org/free-software/bsd/ Simplified BSD (also in js/LICENSE.txt)
+ * @license http://piwik.org/free-software/bsd/ BSD-3 Clause (also in js/LICENSE.txt)
+ * @license magnet:?xt=urn:btih:c80d50af7d3db9be66a4d0a86db0286e4fd33292&dn=bsd-3-clause.txt BSD-3-Clause
*/
if(typeof JSON2!=="object"){JSON2={}}(function(){function d(f){return f<10?"0"+f:f}function l(n,m){var f=Object.prototype.toString.apply(n);if(f==="[object Date]"){return isFinite(n.valueOf())?n.getUTCFullYear()+"-"+d(n.getUTCMonth()+1)+"-"+d(n.getUTCDate())+"T"+d(n.getUTCHours())+":"+d(n.getUTCMinutes())+":"+d(n.getUTCSeconds())+"Z":null}if(f==="[object String]"||f==="[object Number]"||f==="[object Boolean]"){return n.valueOf()}if(f!=="[object Array]"&&typeof n.toJSON==="function"){return n.toJSON(m)}return n}var c=new RegExp("[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]","g"),e='\\\\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]',i=new RegExp("["+e,"g"),j,b,k={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},h;
function a(f){i.lastIndex=0;return i.test(f)?'"'+f.replace(i,function(m){var n=k[m];return typeof n==="string"?n:"\\u"+("0000"+m.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+f+'"'}function g(s,p){var n,m,t,f,q=j,o,r=p[s];if(r&&typeof r==="object"){r=l(r,s)}if(typeof h==="function"){r=h.call(p,s,r)}switch(typeof r){case"string":return a(r);case"number":return isFinite(r)?String(r):"null";case"boolean":case"null":return String(r);case"object":if(!r){return"null"}j+=b;o=[];if(Object.prototype.toString.apply(r)==="[object Array]"){f=r.length;for(n=0;n1){if(console!==undefined&&console&&console.error){console.error("The method "+d+' is registered more than once in "_paq" variable. Only the last call has an effect. Please have a look at the multiple Piwik trackers documentation: http://developer.piwik.org/api-reference/tracking-javascript#multiple-piwik-trackers')}}p[d]++}}for(r=0;r<_paq.length;r++){if(_paq[r]){L(_paq[r])}}_paq=new t();c={addPlugin:function(Q,R){a[Q]=R},getTracker:function(Q,R){return new z(Q,R)},getAsyncTracker:function(){return G}};if(typeof define==="function"&&define.amd){define("piwik",[],function(){return c})}return c}())}if(window&&window.piwikAsyncInit){window.piwikAsyncInit()}(function(){var a=(typeof AnalyticsTracker);if(a==="undefined"){AnalyticsTracker=Piwik}}());if(typeof piwik_log!=="function"){piwik_log=function(b,f,d,g){function a(h){try{return eval("piwik_"+h)
-}catch(i){}return}var c,e=Piwik.getTracker(d,f);e.setDocumentTitle(b);e.setCustomData(g);c=a("tracker_pause");if(c){e.setLinkTrackingTimer(c)}c=a("download_extensions");if(c){e.setDownloadExtensions(c)}c=a("hosts_alias");if(c){e.setDomains(c)}c=a("ignore_classes");if(c){e.setIgnoreClasses(c)}e.trackPageView();if(a("install_tracker")){piwik_track=function(i,k,j,h){e.setSiteId(k);e.setTrackerUrl(j);e.trackLink(i,h)};e.enableLinkTracking()}}};
\ No newline at end of file
+}catch(i){}return}var c,e=Piwik.getTracker(d,f);e.setDocumentTitle(b);e.setCustomData(g);c=a("tracker_pause");if(c){e.setLinkTrackingTimer(c)}c=a("download_extensions");if(c){e.setDownloadExtensions(c)}c=a("hosts_alias");if(c){e.setDomains(c)}c=a("ignore_classes");if(c){e.setIgnoreClasses(c)}e.trackPageView();if(a("install_tracker")){piwik_track=function(i,k,j,h){e.setSiteId(k);e.setTrackerUrl(j);e.trackLink(i,h)};e.enableLinkTracking()}};
+/*! @license-end */
+};
\ No newline at end of file
From 3a28d26de32257045850ea5a602b970a9b5be3f7 Mon Sep 17 00:00:00 2001
From: mattab
Date: Tue, 10 Jun 2014 14:23:12 +1200
Subject: [PATCH 15/36] fix ui build
---
plugins/CoreConsole/Commands/SyncUITestScreenshots.php | 2 +-
plugins/DevicesDetection/DevicesDetection.php | 1 -
tests/PHPUnit/UI | 2 +-
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/plugins/CoreConsole/Commands/SyncUITestScreenshots.php b/plugins/CoreConsole/Commands/SyncUITestScreenshots.php
index 6865393ca2f..0433657bf10 100644
--- a/plugins/CoreConsole/Commands/SyncUITestScreenshots.php
+++ b/plugins/CoreConsole/Commands/SyncUITestScreenshots.php
@@ -73,7 +73,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$downloadTo = "plugins/$testPlugin/tests/UI/expected-ui-screenshots/$file";
}
- $output->write("Downloading $file to .$downloadTo...\n");
+ $output->write("Downloading $file to $downloadTo...\n");
Http::sendHttpRequest("$urlBase/processed-ui-screenshots/$file", $timeout = 60, $userAgent = null,
PIWIK_DOCUMENT_ROOT . "/" . $downloadTo);
}
diff --git a/plugins/DevicesDetection/DevicesDetection.php b/plugins/DevicesDetection/DevicesDetection.php
index 8ef3acd64c3..83a2d90d16c 100644
--- a/plugins/DevicesDetection/DevicesDetection.php
+++ b/plugins/DevicesDetection/DevicesDetection.php
@@ -222,7 +222,6 @@ public function getReportMetadata(&$reports)
public function install()
{
-// we catch the exception
try {
$q1 = "ALTER TABLE `" . Common::prefixTable("log_visit") . "`
ADD `config_os_version` VARCHAR( 100 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL AFTER `config_os` ,
diff --git a/tests/PHPUnit/UI b/tests/PHPUnit/UI
index 462485ccb96..1624d2874ee 160000
--- a/tests/PHPUnit/UI
+++ b/tests/PHPUnit/UI
@@ -1 +1 @@
-Subproject commit 462485ccb965d47d8b1c7cb44ab5f065eec3877d
+Subproject commit 1624d2874eea5d6c32424ee7fb870bfc10ddb388
From 32e2342a79d66ce3250b7379e3e9c4c2a4f2a6e7 Mon Sep 17 00:00:00 2001
From: mattab
Date: Tue, 10 Jun 2014 16:05:39 +1200
Subject: [PATCH 16/36] Enable DevicesDetection plugin by default starting in
2.4.0-b6 refs #5329
---
config/global.ini.php | 1 +
core/Config.php | 10 --------
core/Plugin/Manager.php | 1 -
core/Updates/2.4.0-b6.php | 24 +++++++++++++++++++
core/Version.php | 2 +-
.../Commands/SyncUITestScreenshots.php | 2 +-
tests/PHPUnit/UI | 2 +-
7 files changed, 28 insertions(+), 14 deletions(-)
create mode 100644 core/Updates/2.4.0-b6.php
diff --git a/config/global.ini.php b/config/global.ini.php
index 008b535e0fb..b5b21294bcb 100644
--- a/config/global.ini.php
+++ b/config/global.ini.php
@@ -609,6 +609,7 @@
Plugins[] = MultiSites
Plugins[] = Referrers
Plugins[] = UserSettings
+Plugins[] = DevicesDetection
Plugins[] = Goals
Plugins[] = SEO
Plugins[] = Events
diff --git a/core/Config.php b/core/Config.php
index 6c80734258b..1f91d554f07 100644
--- a/core/Config.php
+++ b/core/Config.php
@@ -148,16 +148,6 @@ public function setTestEnvironment($pathLocal = null, $pathGlobal = null, $pathC
// for unit tests, we set that no plugin is installed. This will force
// the test initialization to create the plugins tables, execute ALTER queries, etc.
$this->configCache['PluginsInstalled'] = array('PluginsInstalled' => array());
-
- // DevicesDetection plugin is not yet enabled by default
- if (isset($configGlobal['Plugins'])) {
- $this->configCache['Plugins'] = $this->configGlobal['Plugins'];
- $this->configCache['Plugins']['Plugins'][] = 'DevicesDetection';
- }
- if (isset($configGlobal['Plugins_Tracker'])) {
- $this->configCache['Plugins_Tracker'] = $this->configGlobal['Plugins_Tracker'];
- $this->configCache['Plugins_Tracker']['Plugins_Tracker'][] = 'DevicesDetection';
- }
}
/**
diff --git a/core/Plugin/Manager.php b/core/Plugin/Manager.php
index 03c3a9f6414..2bd01d4a8cc 100644
--- a/core/Plugin/Manager.php
+++ b/core/Plugin/Manager.php
@@ -68,7 +68,6 @@ class Manager extends Singleton
// Plugins bundled with core package, disabled by default
protected $corePluginsDisabledByDefault = array(
'DBStats',
- 'DevicesDetection',
'ExampleCommand',
'ExampleSettingsPlugin',
'ExampleUI',
diff --git a/core/Updates/2.4.0-b6.php b/core/Updates/2.4.0-b6.php
new file mode 100644
index 00000000000..62ab76c46e6
--- /dev/null
+++ b/core/Updates/2.4.0-b6.php
@@ -0,0 +1,24 @@
+activatePlugin('DevicesDetection');
+ } catch(\Exception $e) {
+ }
+ }
+}
diff --git a/core/Version.php b/core/Version.php
index 44f3a2f0f9d..358d0ee45cc 100644
--- a/core/Version.php
+++ b/core/Version.php
@@ -21,5 +21,5 @@ final class Version
* The current Piwik version.
* @var string
*/
- const VERSION = '2.4.0-b5';
+ const VERSION = '2.4.0-b6';
}
diff --git a/plugins/CoreConsole/Commands/SyncUITestScreenshots.php b/plugins/CoreConsole/Commands/SyncUITestScreenshots.php
index 0433657bf10..872b5508432 100644
--- a/plugins/CoreConsole/Commands/SyncUITestScreenshots.php
+++ b/plugins/CoreConsole/Commands/SyncUITestScreenshots.php
@@ -73,7 +73,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$downloadTo = "plugins/$testPlugin/tests/UI/expected-ui-screenshots/$file";
}
- $output->write("Downloading $file to $downloadTo...\n");
+ $output->write("Downloading $file to $downloadTo...\n");
Http::sendHttpRequest("$urlBase/processed-ui-screenshots/$file", $timeout = 60, $userAgent = null,
PIWIK_DOCUMENT_ROOT . "/" . $downloadTo);
}
diff --git a/tests/PHPUnit/UI b/tests/PHPUnit/UI
index 1624d2874ee..4a97de9e6df 160000
--- a/tests/PHPUnit/UI
+++ b/tests/PHPUnit/UI
@@ -1 +1 @@
-Subproject commit 1624d2874eea5d6c32424ee7fb870bfc10ddb388
+Subproject commit 4a97de9e6dfa05f784d07297a4ab27f5e928c914
From aeb9c28e0bb4549cbb395fd8fafebfd67c62ec3d Mon Sep 17 00:00:00 2001
From: mattab
Date: Tue, 10 Jun 2014 16:40:39 +1200
Subject: [PATCH 17/36] Remove manual activation of plugin refs #5329
---
tests/LocalTracker.php | 1 -
1 file changed, 1 deletion(-)
diff --git a/tests/LocalTracker.php b/tests/LocalTracker.php
index d8ca29ea440..366996b4657 100755
--- a/tests/LocalTracker.php
+++ b/tests/LocalTracker.php
@@ -51,7 +51,6 @@ protected function sendRequest($url, $method = 'GET', $data = null, $force = fal
// save some values
$plugins = Config::getInstance()->Plugins['Plugins'];
- $plugins[] = 'DevicesDetection';
$pluginsTracker = Config::getInstance()->Plugins_Tracker['Plugins_Tracker'];
$oldTrackerConfig = Config::getInstance()->Tracker;
From 44329d3098165c61e93187ee933ad00e381bb70f Mon Sep 17 00:00:00 2001
From: diosmosis
Date: Thu, 5 Jun 2014 17:34:25 -0700
Subject: [PATCH 18/36] Show backtrace if should be shown when Visualization
cannot load the DataTable result.
---
core/Plugin/Visualization.php | 7 ++++++-
tests/PHPUnit/UI | 2 +-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/core/Plugin/Visualization.php b/core/Plugin/Visualization.php
index d73f13fd8e9..e86274c5ea1 100644
--- a/core/Plugin/Visualization.php
+++ b/core/Plugin/Visualization.php
@@ -179,7 +179,12 @@ protected function buildView()
} catch (\Exception $e) {
Log::warning("Failed to get data from API: " . $e->getMessage() . "\n" . $e->getTraceAsString());
- $loadingError = array('message' => $e->getMessage());
+ $message = $e->getMessage();
+ if (\Piwik_ShouldPrintBackTraceWithMessage()) {
+ $message .= "\n" . $e->getTraceAsString();
+ }
+
+ $loadingError = array('message' => $message);
}
$view = new View("@CoreHome/_dataTable");
diff --git a/tests/PHPUnit/UI b/tests/PHPUnit/UI
index 4a97de9e6df..d9f04075957 160000
--- a/tests/PHPUnit/UI
+++ b/tests/PHPUnit/UI
@@ -1 +1 @@
-Subproject commit 4a97de9e6dfa05f784d07297a4ab27f5e928c914
+Subproject commit d9f0407595746d3c96d8e7e77e9a367b0b2e6afb
From 346688dde34ba1114400f838feb1bcff72fd2303 Mon Sep 17 00:00:00 2001
From: diosmosis
Date: Mon, 9 Jun 2014 22:10:38 -0700
Subject: [PATCH 19/36] Tweak to FrontController documentation.
---
core/FrontController.php | 2 --
1 file changed, 2 deletions(-)
diff --git a/core/FrontController.php b/core/FrontController.php
index ecad3e7bd3b..c67d3133370 100644
--- a/core/FrontController.php
+++ b/core/FrontController.php
@@ -64,8 +64,6 @@ class FrontController extends Singleton
/**
* Executes the requested plugin controller method.
*
- * See also {@link fetchDispatch()}.
- *
* @throws Exception|\Piwik\PluginDeactivatedException in case the plugin doesn't exist, the action doesn't exist,
* there is not enough permission, etc.
*
From 3c4eaf174ef5fe998a74ed2451341f9c212edad5 Mon Sep 17 00:00:00 2001
From: diosmosis
Date: Mon, 9 Jun 2014 22:12:27 -0700
Subject: [PATCH 20/36] Include IntegrationTestCase in SetupFixture class since
Fixture depends on IntegrationTestCase, and check for specs in
/tests in addition to /Test.
---
plugins/CoreConsole/Commands/SetupFixture.php | 1 +
tests/lib/screenshot-testing/support/app.js | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/plugins/CoreConsole/Commands/SetupFixture.php b/plugins/CoreConsole/Commands/SetupFixture.php
index 29b62bf08da..91f79d0d1bd 100644
--- a/plugins/CoreConsole/Commands/SetupFixture.php
+++ b/plugins/CoreConsole/Commands/SetupFixture.php
@@ -160,6 +160,7 @@ private function requireFixtureFiles()
require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/TestingEnvironment.php';
require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/IntegrationTestCase.php';
require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/Fixture.php';
+ require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/IntegrationTestCase.php';
$fixturesToLoad = array(
'/tests/PHPUnit/Fixtures/*.php',
diff --git a/tests/lib/screenshot-testing/support/app.js b/tests/lib/screenshot-testing/support/app.js
index 655974bf9f6..037bb5925a8 100644
--- a/tests/lib/screenshot-testing/support/app.js
+++ b/tests/lib/screenshot-testing/support/app.js
@@ -96,6 +96,7 @@ Application.prototype.loadTestModules = function () {
plugins.forEach(function (pluginPath) {
walk(path.join(pluginPath, 'Test'), /_spec\.js$/, modulePaths);
+ walk(path.join(pluginPath, 'tests'), /_spec\.js$/, modulePaths);
});
modulePaths.forEach(function (path) {
@@ -206,7 +207,7 @@ Application.prototype.doRunTests = function () {
};
Application.prototype.finish = function () {
- phantom.exit(this.runner.failures);
+ phantom.exit(this.runner ? this.runner.failures : -1);
};
exports.Application = new Application();
\ No newline at end of file
From a547137c4a407831049080a8345af4c510c71b5f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcin=20Czo=C5=82nowski?=
Date: Tue, 10 Jun 2014 10:10:36 +0200
Subject: [PATCH 21/36] Password validation logic removed from UsersManager
plugin file and implement in hook result. (in separate plugins) Added events
documentation.
---
plugins/UsersManager/API.php | 2 +
plugins/UsersManager/PasswordValidator.php | 20 ---------
.../PasswordValidator/LengthValidator.php | 36 ----------------
plugins/UsersManager/UsersManager.php | 42 +++++++++----------
4 files changed, 23 insertions(+), 77 deletions(-)
delete mode 100644 plugins/UsersManager/PasswordValidator.php
delete mode 100644 plugins/UsersManager/PasswordValidator/LengthValidator.php
diff --git a/plugins/UsersManager/API.php b/plugins/UsersManager/API.php
index 411c86981a9..05edc496675 100644
--- a/plugins/UsersManager/API.php
+++ b/plugins/UsersManager/API.php
@@ -444,8 +444,10 @@ public function updateUser($userLogin, $password = false, $email = false, $alias
/**
* Triggered after an existing user has been updated.
+ * Event notify about password change.
*
* @param string $userLogin The user's login handle.
+ * @param boolean $passwordHasBeenUpdated Flag containing information about password change.
*/
Piwik::postEvent('UsersManager.updateUser.end', array($userLogin, $passwordHasBeenUpdated));
}
diff --git a/plugins/UsersManager/PasswordValidator.php b/plugins/UsersManager/PasswordValidator.php
deleted file mode 100644
index 648571416a3..00000000000
--- a/plugins/UsersManager/PasswordValidator.php
+++ /dev/null
@@ -1,20 +0,0 @@
-validate($password)) {
- $errors[] = $validator->getErrorMessage();
- }
- }
- }
-
- if (!empty($errors)) {
- $initialMessage = '%s';
- Piwik::postEvent('UsersManager.getPasswordValidatorsErrorInitialMessage', array(&$initialMessage));
-
- throw new Exception(
- sprintf($initialMessage, implode(', ', $errors))
- );
+ /**
+ * Triggered before core password validator check password.
+ *
+ * This event exists for enable option to create custom password validation rules.
+ * It can be used to validate password (length, used chars etc) and to notify about checking password.
+ *
+ * **Example**
+ *
+ * Piwik::addAction('UsersManager.checkPassword', function ($password) {
+ * if (strlen($password) < 10) {
+ * throw new Exception('Password is too short.');
+ * }
+ * });
+ *
+ * @param array $password Checking password in plain text.
+ */
+ Piwik::postEvent('UsersManager.checkPassword', array($password));
+
+ if (!self::isValidPasswordString($password)) {
+ throw new Exception(Piwik::translate('UsersManager_ExceptionInvalidPassword', array(self::PASSWORD_MIN_LENGTH,
+ self::PASSWORD_MAX_LENGTH)));
}
}
From 3e7e42be74c373b98901e428b7638757d6af62fe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcin=20Czo=C5=82nowski?=
Date: Tue, 10 Jun 2014 11:56:35 +0200
Subject: [PATCH 22/36] Fix parameter type.
---
plugins/UsersManager/UsersManager.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/UsersManager/UsersManager.php b/plugins/UsersManager/UsersManager.php
index 9e677f56884..3065520552a 100644
--- a/plugins/UsersManager/UsersManager.php
+++ b/plugins/UsersManager/UsersManager.php
@@ -125,7 +125,7 @@ public static function checkPassword($password)
* }
* });
*
- * @param array $password Checking password in plain text.
+ * @param string $password Checking password in plain text.
*/
Piwik::postEvent('UsersManager.checkPassword', array($password));
From fe325bb6f1f6c25dae8fe41484f4f4664037c42b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcin=20Czo=C5=82nowski?=
Date: Tue, 10 Jun 2014 12:10:39 +0200
Subject: [PATCH 23/36] Added hooks to init session process.
---
plugins/Login/Auth.php | 70 ++++++++++++++++++++++++++++++++++++++++--
1 file changed, 67 insertions(+), 3 deletions(-)
diff --git a/plugins/Login/Auth.php b/plugins/Login/Auth.php
index 9bb0b8127ac..4af32e47bba 100644
--- a/plugins/Login/Auth.php
+++ b/plugins/Login/Auth.php
@@ -1,6 +1,6 @@
wasAuthenticationSuccessful()) {
$this->processFailedSession($rememberMe);
} else {
- $this->processSuccessfullSession($login, $authResult->getTokenAuth(), $rememberMe);
+ $this->processSuccessfulSession($login, $authResult->getTokenAuth(), $rememberMe);
}
+
+ /**
+ * Triggered after session initialize.
+ * This event notify about end of init session process.
+ *
+ * **Example**
+ *
+ * Piwik::addAction('Login.initSession.end', function () {
+ * // session has been initialized
+ * });
+ */
+ Piwik::postEvent('Login.initSession.end');
}
/**
@@ -131,6 +143,33 @@ protected function doAuthenticateSession($login, $md5Password)
$this->setLogin($login);
$this->setTokenAuth($tokenAuth);
+
+ /**
+ * Triggered before authenticate function.
+ * This event propagate login and token_auth which will be using in authenticate process.
+ *
+ * This event exists to enable possibility for user authentication prevention.
+ * For example when user is locked or inactive.
+ *
+ * **Example**
+ *
+ * Piwik::addAction('Login.authenticate', function ($login, $tokenAuth) {
+ * if (!UserActivityManager::isActive ($login, $tokenAuth) {
+ * throw new Exception('Your account is inactive.');
+ * }
+ * });
+ *
+ * @param string $login User login.
+ * @param string $tokenAuth User token auth.
+ */
+ Piwik::postEvent(
+ 'Login.authenticate',
+ array(
+ $login,
+ $tokenAuth
+ )
+ );
+
$authResult = $this->authenticate();
return $authResult;
}
@@ -166,8 +205,33 @@ protected function processFailedSession($rememberMe)
* @param $tokenAuth
* @param $rememberMe
*/
- protected function processSuccessfullSession($login, $tokenAuth, $rememberMe)
+ protected function processSuccessfulSession($login, $tokenAuth, $rememberMe)
{
+ /**
+ * Triggered after successful authenticate, but before cookie creation.
+ * This event propagate login and token_auth which was used in authenticate process.
+ *
+ * This event exists to enable the ability to custom action before the cookie will be created,
+ * but after a successful authentication.
+ * For example when user have to fill survey or change password.
+ *
+ * **Example**
+ *
+ * Piwik::addAction('Login.authenticate.successful', function ($login, $tokenAuth) {
+ * // redirect to change password action
+ * });
+ *
+ * @param string $login User login.
+ * @param string $tokenAuth User token auth.
+ */
+ Piwik::postEvent(
+ 'Login.authenticate.successful',
+ array(
+ $login,
+ $tokenAuth
+ )
+ );
+
$cookie = $this->getAuthCookie($rememberMe);
$cookie->set('login', $login);
$cookie->set('token_auth', $this->getHashTokenAuth($login, $tokenAuth));
From 534fb14f7b80560db774f27bac0996a0106f8621 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcin=20Czo=C5=82nowski?=
Date: Tue, 10 Jun 2014 12:12:31 +0200
Subject: [PATCH 24/36] Revert comment from file header.
---
plugins/Login/Auth.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/Login/Auth.php b/plugins/Login/Auth.php
index 4af32e47bba..55f31757c11 100644
--- a/plugins/Login/Auth.php
+++ b/plugins/Login/Auth.php
@@ -1,6 +1,6 @@
Date: Tue, 10 Jun 2014 22:21:21 +1200
Subject: [PATCH 25/36] fix ui build
---
tests/PHPUnit/UI | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/PHPUnit/UI b/tests/PHPUnit/UI
index 4a97de9e6df..835d859c96e 160000
--- a/tests/PHPUnit/UI
+++ b/tests/PHPUnit/UI
@@ -1 +1 @@
-Subproject commit 4a97de9e6dfa05f784d07297a4ab27f5e928c914
+Subproject commit 835d859c96e9bce80ed458d7d124a7494230b729
From 2b641d3ce1cfd0aee0473246be02f10f7a81aec5 Mon Sep 17 00:00:00 2001
From: diosmosis
Date: Tue, 10 Jun 2014 14:18:16 -0700
Subject: [PATCH 26/36] Add small base test case class for testing console
commands.
---
tests/PHPUnit/ConsoleCommandTestCase.php | 56 ++++++++++++++++++++++++
tests/PHPUnit/bootstrap.php | 1 +
2 files changed, 57 insertions(+)
create mode 100644 tests/PHPUnit/ConsoleCommandTestCase.php
diff --git a/tests/PHPUnit/ConsoleCommandTestCase.php b/tests/PHPUnit/ConsoleCommandTestCase.php
new file mode 100644
index 00000000000..4ff21b4cafd
--- /dev/null
+++ b/tests/PHPUnit/ConsoleCommandTestCase.php
@@ -0,0 +1,56 @@
+applicationTester->run(array(
+ * 'command' => 'my-command',
+ * 'arg1' => 'value1',
+ * 'arg2' => 'value2',
+ * '--option' => true,
+ * '--another-option' => 'value3'
+ * ));
+ * $this->assertEquals(0, $result, $this->getCommandDisplayOutputErrorMessage());
+ *
+ * // other checks
+ * }
+ */
+class ConsoleCommandTestCase extends \IntegrationTestCase
+{
+ protected $applicationTester = null;
+
+ public function setUp()
+ {
+ parent::setUp();
+
+ $application = new Console();
+ $application->setAutoExit(false);
+
+ $this->applicationTester = new ApplicationTester($application);
+
+ Config::unsetInstance();
+ }
+
+ protected function getCommandDisplayOutputErrorMessage()
+ {
+ return "Command did not behave as expected. Command output: " . $this->applicationTester->getDisplay();
+ }
+}
\ No newline at end of file
diff --git a/tests/PHPUnit/bootstrap.php b/tests/PHPUnit/bootstrap.php
index 1dcb995b0ea..429b3d17e6f 100644
--- a/tests/PHPUnit/bootstrap.php
+++ b/tests/PHPUnit/bootstrap.php
@@ -34,6 +34,7 @@
require_once PIWIK_INCLUDE_PATH . '/core/FrontController.php';
require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/DatabaseTestCase.php';
require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/IntegrationTestCase.php';
+require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/ConsoleCommandTestCase.php';
require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/FakeAccess.php';
require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/MockPiwikOption.php';
require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/TestingEnvironment.php';
From 042c2e009f2d1cbed5c4de4c581113cc088de683 Mon Sep 17 00:00:00 2001
From: mattab
Date: Wed, 11 Jun 2014 11:23:37 +1200
Subject: [PATCH 27/36] fix ui build
---
tests/PHPUnit/UI | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/PHPUnit/UI b/tests/PHPUnit/UI
index 835d859c96e..ddaa3bff191 160000
--- a/tests/PHPUnit/UI
+++ b/tests/PHPUnit/UI
@@ -1 +1 @@
-Subproject commit 835d859c96e9bce80ed458d7d124a7494230b729
+Subproject commit ddaa3bff19105cbff8ddf617f82fd0906c5d4f0a
From 1515680fa1e9a05cfdbcd5bfc38a132172353f40 Mon Sep 17 00:00:00 2001
From: Thomas Steur
Date: Wed, 11 Jun 2014 14:12:21 +1200
Subject: [PATCH 28/36] refs #5326 does widget definitions were duplicated I
think
---
plugins/Referrers/Referrers.php | 17 -----------------
1 file changed, 17 deletions(-)
diff --git a/plugins/Referrers/Referrers.php b/plugins/Referrers/Referrers.php
index eee977c1478..e2fb25f2c51 100644
--- a/plugins/Referrers/Referrers.php
+++ b/plugins/Referrers/Referrers.php
@@ -224,23 +224,6 @@ public function getSegmentsMetadata(&$segments)
);
}
- /**
- * Adds Referrer widgets
- */
- function addWidgets()
- {
- WidgetsList::add('Referrers_Referrers', 'Referrers_WidgetKeywords', 'Referrers', 'getKeywords');
- WidgetsList::add('Referrers_Referrers', 'Referrers_WidgetExternalWebsites', 'Referrers', 'getWebsites');
- WidgetsList::add('Referrers_Referrers', 'Referrers_WidgetSocials', 'Referrers', 'getSocials');
- WidgetsList::add('Referrers_Referrers', 'Referrers_SearchEngines', 'Referrers', 'getSearchEngines');
- WidgetsList::add('Referrers_Referrers', 'Referrers_Campaigns', 'Referrers', 'getCampaigns');
- WidgetsList::add('Referrers_Referrers', 'General_Overview', 'Referrers', 'getReferrerType');
- WidgetsList::add('Referrers_Referrers', 'Referrers_WidgetGetAll', 'Referrers', 'getAll');
- if (SettingsPiwik::isSegmentationEnabled()) {
- WidgetsList::add('SEO', 'Referrers_WidgetTopKeywordsForPages', 'Referrers', 'getKeywordsForPage');
- }
- }
-
/**
* Adds Goal dimensions, so that the dimensions are displayed in the UI Goal Overview page
*/
From 2f65d58079a7412621bb470e53aa23d8fcd31e37 Mon Sep 17 00:00:00 2001
From: diosmosis
Date: Tue, 10 Jun 2014 22:09:36 -0700
Subject: [PATCH 29/36] Make sure screenshot tests do not fail mysteriously if
the REQUEST_URI doesn't end w/ a /. (Piwik will assume such a URI points to a
file and not a folder, and cut it out when determining the root Piwik URL.)
---
tests/PHPUnit/UI | 2 +-
tests/lib/screenshot-testing/run-tests.js | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/tests/PHPUnit/UI b/tests/PHPUnit/UI
index ddaa3bff191..6cc46ac54fa 160000
--- a/tests/PHPUnit/UI
+++ b/tests/PHPUnit/UI
@@ -1 +1 @@
-Subproject commit ddaa3bff19105cbff8ddf617f82fd0906c5d4f0a
+Subproject commit 6cc46ac54fa8ff3a0ebc4e3a9e9dae1c36514e79
diff --git a/tests/lib/screenshot-testing/run-tests.js b/tests/lib/screenshot-testing/run-tests.js
index 6ddde1d92f3..62d7a56012b 100644
--- a/tests/lib/screenshot-testing/run-tests.js
+++ b/tests/lib/screenshot-testing/run-tests.js
@@ -10,6 +10,11 @@
// required modules
var config = require("./config");
+// assume the URI points to a folder and make sure Piwik won't cut off the last path segment
+if (config.phpServer.REQUEST_URI.slice(-1) != '/') {
+ config.phpServer.REQUEST_URI += '/';
+}
+
require('./support/fs-extras');
phantom.injectJs('./support/globals.js');
From 4961c548ab2fad2b8da52aae4975865a67ca98a6 Mon Sep 17 00:00:00 2001
From: mattab
Date: Wed, 11 Jun 2014 17:13:41 +1200
Subject: [PATCH 30/36] put most useful settings first
---
tests/lib/screenshot-testing/config.js | 40 +++++++++++++-------------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/tests/lib/screenshot-testing/config.js b/tests/lib/screenshot-testing/config.js
index bc43c105b78..3341acedd2a 100644
--- a/tests/lib/screenshot-testing/config.js
+++ b/tests/lib/screenshot-testing/config.js
@@ -7,6 +7,26 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
+/**
+ * The root Piwik URL to test against.
+ */
+exports.piwikUrl = "http://localhost/piwik-master/";
+
+/**
+ * Data for the $_SERVER variable in the setup/teardown PHP scripts. Should be the same as
+ * the values in your phpunit.xml file.
+ */
+exports.phpServer = {
+ HTTP_HOST: 'localhost',
+ REQUEST_URI: '/piwik-master/',
+ REMOTE_ADDR: '127.0.0.1'
+};
+
+/**
+ * The path to the PHP executable to execute when setting up & tearing down the database.
+ */
+exports.php = 'php';
+
/**
* The folder in tests/lib that holds mocha.
*/
@@ -36,23 +56,3 @@ exports.processedScreenshotsDir = "./processed-ui-screenshots";
* The directory that stores screenshot diffs. Relative to the UI repo's root directory.
*/
exports.screenshotDiffDir = "./screenshot-diffs";
-
-/**
- * The root Piwik URL to test against.
- */
-exports.piwikUrl = "http://localhost/";
-
-/**
- * The path to the PHP executable to execute when setting up & tearing down the database.
- */
-exports.php = 'php';
-
-/**
- * Data for the $_SERVER variable in the setup/teardown PHP scripts. Should be the same as
- * the values in your phpunit.xml file.
- */
-exports.phpServer = {
- HTTP_HOST: 'localhost',
- REQUEST_URI: '/',
- REMOTE_ADDR: '127.0.0.1'
-};
\ No newline at end of file
From 6b050cc6c00e9d3f1e0c496a19807195245050b5 Mon Sep 17 00:00:00 2001
From: mattab
Date: Wed, 11 Jun 2014 17:15:45 +1200
Subject: [PATCH 31/36] Show example of config.js for screenshot test config
---
tests/PHPUnit/UI | 2 +-
tests/README.screenshots.md | 15 ++++++++++++++-
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/tests/PHPUnit/UI b/tests/PHPUnit/UI
index 6cc46ac54fa..bf3580ee9fd 160000
--- a/tests/PHPUnit/UI
+++ b/tests/PHPUnit/UI
@@ -1 +1 @@
-Subproject commit 6cc46ac54fa8ff3a0ebc4e3a9e9dae1c36514e79
+Subproject commit bf3580ee9fd2cbd904cd581409127581de5c87f2
diff --git a/tests/README.screenshots.md b/tests/README.screenshots.md
index 39648b14358..b8f54c02632 100644
--- a/tests/README.screenshots.md
+++ b/tests/README.screenshots.md
@@ -64,7 +64,20 @@ Removing this font may be useful if your generated screenshots' fonts do not mat
### Configuring screenshot testing library
-The screenshot testing library's configuration resides in the tests/lib/screenshot-testing/config.js file. If your development environment's PHP executable isn't named 'php' or your dev Piwik install isn't at http://localhost/, you may need to edit the contents of this file.
+The screenshot testing library's configuration resides in the tests/lib/screenshot-testing/config.js file.
+If your development environment's PHP executable isn't named `php`
+or your dev Piwik install isn't at `http://localhost/` you may need to edit the contents of this file.
+
+For example if Piwik is setup at `http://localhost/piwik` modify the config.js such as:
+```
+exports.piwikUrl = "http://localhost/piwik/";
+exports.phpServer = {
+ HTTP_HOST: 'localhost',
+ REQUEST_URI: '/piwik/',
+ REMOTE_ADDR: '127.0.0.1'
+};
+
+```
## Running Tests
From f9a1354211da95c20eb7066d391f13a89aeacf54 Mon Sep 17 00:00:00 2001
From: mattab
Date: Wed, 11 Jun 2014 17:40:10 +1200
Subject: [PATCH 32/36] Fix typo from previous commit
---
tests/lib/screenshot-testing/config.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/lib/screenshot-testing/config.js b/tests/lib/screenshot-testing/config.js
index 3341acedd2a..5e93ba3b027 100644
--- a/tests/lib/screenshot-testing/config.js
+++ b/tests/lib/screenshot-testing/config.js
@@ -10,7 +10,7 @@
/**
* The root Piwik URL to test against.
*/
-exports.piwikUrl = "http://localhost/piwik-master/";
+exports.piwikUrl = "http://localhost/";
/**
* Data for the $_SERVER variable in the setup/teardown PHP scripts. Should be the same as
@@ -18,7 +18,7 @@ exports.piwikUrl = "http://localhost/piwik-master/";
*/
exports.phpServer = {
HTTP_HOST: 'localhost',
- REQUEST_URI: '/piwik-master/',
+ REQUEST_URI: '/',
REMOTE_ADDR: '127.0.0.1'
};
From f123b7b1b39aba5f60c0e6844a93fe7d3676ea7f Mon Sep 17 00:00:00 2001
From: diosmosis
Date: Wed, 11 Jun 2014 12:53:31 -0700
Subject: [PATCH 33/36] Allow code to remove assets (like the merged
stylesheet) manually if needed.
---
core/AssetManager.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/AssetManager.php b/core/AssetManager.php
index 6f815569ab3..4bf29afef0e 100644
--- a/core/AssetManager.php
+++ b/core/AssetManager.php
@@ -363,7 +363,7 @@ private function pluginContainsJScriptAssets($pluginName)
/**
* @param UIAsset[] $uiAssets
*/
- private function removeAssets($uiAssets)
+ public function removeAssets($uiAssets)
{
foreach($uiAssets as $uiAsset) {
$uiAsset->delete();
From b06b1189c355ec8ecc9dc912f30da55432b9a126 Mon Sep 17 00:00:00 2001
From: mattab
Date: Thu, 12 Jun 2014 12:37:51 +1200
Subject: [PATCH 34/36] Removing couple lines not needed. let's see if UI tests
still pass... refs PR#312
When I removed the first line as well then I see several changes to Morpheus:
* Graph colors
* titles
* Segment box
loook different. So I'm only removing last two lines.
---
core/AssetManager/UIAssetFetcher/StylesheetUIAssetFetcher.php | 2 --
1 file changed, 2 deletions(-)
diff --git a/core/AssetManager/UIAssetFetcher/StylesheetUIAssetFetcher.php b/core/AssetManager/UIAssetFetcher/StylesheetUIAssetFetcher.php
index 4329d5fcff4..414a5d44e72 100644
--- a/core/AssetManager/UIAssetFetcher/StylesheetUIAssetFetcher.php
+++ b/core/AssetManager/UIAssetFetcher/StylesheetUIAssetFetcher.php
@@ -21,8 +21,6 @@ protected function getPriorityOrder()
'plugins/Morpheus/stylesheets/base.less',
'plugins\/((?!Morpheus).)*\/',
'plugins/Dashboard/stylesheets/dashboard.less',
- 'plugins/Morpheus/stylesheets/theme.less',
- 'plugins/Morpheus/stylesheets/',
'tests/',
);
}
From fad4acb1e92339c0fbd1ba221791459d4a9f910d Mon Sep 17 00:00:00 2001
From: mattab
Date: Thu, 12 Jun 2014 16:11:14 +1200
Subject: [PATCH 35/36] directories Should Be Chmod 755
---
tests/PHPUnit/Core/ReleaseCheckListTest.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/PHPUnit/Core/ReleaseCheckListTest.php b/tests/PHPUnit/Core/ReleaseCheckListTest.php
index 3089e99f61c..cb53dde0dc3 100644
--- a/tests/PHPUnit/Core/ReleaseCheckListTest.php
+++ b/tests/PHPUnit/Core/ReleaseCheckListTest.php
@@ -191,7 +191,7 @@ public function test_phpFilesStartWithRightCharacter()
/**
* @group Core
*/
- public function disabled_test_directoriesShouldBeChmod755()
+ public function test_directoriesShouldBeChmod755()
{
$pluginsPath = realpath(PIWIK_INCLUDE_PATH . '/plugins/');
From 54ee416790f04fca83b8521837ca049aac55c6fd Mon Sep 17 00:00:00 2001
From: mattab
Date: Thu, 12 Jun 2014 16:46:26 +1200
Subject: [PATCH 36/36] Factoring out the userPreferences in own object to
allow reuse
---
core/Plugin/Controller.php | 88 ++--------------------
core/Plugin/ControllerAdmin.php | 9 ---
plugins/UsersManager/Controller.php | 16 +++-
plugins/UsersManager/UserPreferences.php | 93 ++++++++++++++++++++++++
tests/PHPUnit/UI | 2 +-
5 files changed, 115 insertions(+), 93 deletions(-)
create mode 100644 plugins/UsersManager/UserPreferences.php
diff --git a/core/Plugin/Controller.php b/core/Plugin/Controller.php
index 4b1e4e5efcd..43e385f2639 100644
--- a/core/Plugin/Controller.php
+++ b/core/Plugin/Controller.php
@@ -29,8 +29,7 @@
use Piwik\Plugins\CoreAdminHome\CustomLogo;
use Piwik\Plugins\CoreVisualizations\Visualizations\JqplotGraph\Evolution;
use Piwik\Plugins\LanguagesManager\LanguagesManager;
-use Piwik\Plugins\SitesManager\API as APISitesManager;
-use Piwik\Plugins\UsersManager\API as APIUsersManager;
+use Piwik\Plugins\UsersManager\UserPreferences;
use Piwik\Registry;
use Piwik\SettingsPiwik;
use Piwik\Site;
@@ -769,14 +768,17 @@ public static function setPeriodVariablesView($view)
public function redirectToIndex($moduleToRedirect, $actionToRedirect, $websiteId = null, $defaultPeriod = null,
$defaultDate = null, $parameters = array())
{
+
+ $userPreferences = new UserPreferences();
+
if (empty($websiteId)) {
- $websiteId = $this->getDefaultWebsiteId();
+ $websiteId = $userPreferences->getDefaultWebsiteId();
}
if (empty($defaultDate)) {
- $defaultDate = $this->getDefaultDate();
+ $defaultDate = $userPreferences->getDefaultDate();
}
if (empty($defaultPeriod)) {
- $defaultPeriod = $this->getDefaultPeriod();
+ $defaultPeriod = $userPreferences->getDefaultPeriod();
}
$parametersString = '';
if (!empty($parameters)) {
@@ -813,82 +815,6 @@ public function redirectToIndex($moduleToRedirect, $actionToRedirect, $websiteId
exit;
}
- /**
- * Returns default site ID that Piwik should load.
- *
- * _Note: This value is a Piwik setting set by each user._
- *
- * @return bool|int
- * @api
- */
- protected function getDefaultWebsiteId()
- {
- $defaultWebsiteId = false;
-
- // User preference: default website ID to load
- $defaultReport = APIUsersManager::getInstance()->getUserPreference(Piwik::getCurrentUserLogin(), APIUsersManager::PREFERENCE_DEFAULT_REPORT);
- if (is_numeric($defaultReport)) {
- $defaultWebsiteId = $defaultReport;
- }
-
- if ($defaultWebsiteId && Piwik::isUserHasViewAccess($defaultWebsiteId)) {
- return $defaultWebsiteId;
- }
-
- $sitesId = APISitesManager::getInstance()->getSitesIdWithAtLeastViewAccess();
- if (!empty($sitesId)) {
- return $sitesId[0];
- }
- return false;
- }
-
- /**
- * Returns default date for Piwik reports.
- *
- * _Note: This value is a Piwik setting set by each user._
- *
- * @return string `'today'`, `'2010-01-01'`, etc.
- * @api
- */
- protected function getDefaultDate()
- {
- // NOTE: a change in this function might mean a change in plugins/UsersManager/javascripts/usersSettings.js as well
- $userSettingsDate = APIUsersManager::getInstance()->getUserPreference(Piwik::getCurrentUserLogin(), APIUsersManager::PREFERENCE_DEFAULT_REPORT_DATE);
- if ($userSettingsDate == 'yesterday') {
- return $userSettingsDate;
- }
- // if last7, last30, etc.
- if (strpos($userSettingsDate, 'last') === 0
- || strpos($userSettingsDate, 'previous') === 0
- ) {
- return $userSettingsDate;
- }
- return 'today';
- }
-
- /**
- * Returns default period type for Piwik reports.
- *
- * @return string `'day'`, `'week'`, `'month'`, `'year'` or `'range'`
- * @api
- */
- protected function getDefaultPeriod()
- {
- $userSettingsDate = APIUsersManager::getInstance()->getUserPreference(Piwik::getCurrentUserLogin(), APIUsersManager::PREFERENCE_DEFAULT_REPORT_DATE);
- if ($userSettingsDate === false) {
- return PiwikConfig::getInstance()->General['default_period'];
- }
- if (in_array($userSettingsDate, array('today', 'yesterday'))) {
- return 'day';
- }
- if (strpos($userSettingsDate, 'last') === 0
- || strpos($userSettingsDate, 'previous') === 0
- ) {
- return 'range';
- }
- return $userSettingsDate;
- }
-
/**
* Checks that the token_auth in the URL matches the currently logged-in user's token_auth.
*
diff --git a/core/Plugin/ControllerAdmin.php b/core/Plugin/ControllerAdmin.php
index 2e39b7f8527..4254cdbb2c3 100644
--- a/core/Plugin/ControllerAdmin.php
+++ b/core/Plugin/ControllerAdmin.php
@@ -206,13 +206,4 @@ private static function checkPhpVersion($view)
$view->phpVersion = PHP_VERSION;
$view->phpIsNewEnough = version_compare($view->phpVersion, '5.3.0', '>=');
}
-
- protected function getDefaultWebsiteId()
- {
- $sitesId = \Piwik\Plugins\SitesManager\API::getInstance()->getSitesIdWithAdminAccess();
- if (!empty($sitesId)) {
- return $sitesId[0];
- }
- return parent::getDefaultWebsiteId();
- }
}
diff --git a/plugins/UsersManager/Controller.php b/plugins/UsersManager/Controller.php
index 3fd75e0f701..12691a5ce01 100644
--- a/plugins/UsersManager/Controller.php
+++ b/plugins/UsersManager/Controller.php
@@ -209,14 +209,17 @@ public function userSettings()
$view->userAlias = $user['alias'];
$view->userEmail = $user['email'];
- $defaultReport = APIUsersManager::getInstance()->getUserPreference($userLogin, APIUsersManager::PREFERENCE_DEFAULT_REPORT);
+ $userPreferences = new UserPreferences();
+ $defaultReport = $userPreferences->getDefaultWebsiteId();
if ($defaultReport === false) {
$defaultReport = $this->getDefaultWebsiteId();
}
$view->defaultReport = $defaultReport;
if ($defaultReport == 'MultiSites') {
- $view->defaultReportSiteName = Site::getNameFor($this->getDefaultWebsiteId());
+
+ $userPreferences = new UserPreferences();
+ $view->defaultReportSiteName = Site::getNameFor($userPreferences->getDefaultWebsiteId());
} else {
$view->defaultReportSiteName = Site::getNameFor($defaultReport);
}
@@ -234,6 +237,15 @@ public function userSettings()
return $view->render();
}
+ protected function getDefaultWebsiteId()
+ {
+ $sitesId = \Piwik\Plugins\SitesManager\API::getInstance()->getSitesIdWithAdminAccess();
+ if (!empty($sitesId)) {
+ return $sitesId[0];
+ }
+ return false;
+ }
+
public function setIgnoreCookie()
{
Piwik::checkUserHasSomeViewAccess();
diff --git a/plugins/UsersManager/UserPreferences.php b/plugins/UsersManager/UserPreferences.php
new file mode 100644
index 00000000000..649271144d6
--- /dev/null
+++ b/plugins/UsersManager/UserPreferences.php
@@ -0,0 +1,93 @@
+getUserPreference(Piwik::getCurrentUserLogin(), APIUsersManager::PREFERENCE_DEFAULT_REPORT);
+ if (is_numeric($defaultReport)) {
+ $defaultWebsiteId = $defaultReport;
+ }
+
+ if ($defaultWebsiteId && Piwik::isUserHasViewAccess($defaultWebsiteId)) {
+ return $defaultWebsiteId;
+ }
+
+ $sitesId = APISitesManager::getInstance()->getSitesIdWithAtLeastViewAccess();
+ if (!empty($sitesId)) {
+ return $sitesId[0];
+ }
+ return false;
+ }
+
+ /**
+ * Returns default date for Piwik reports.
+ *
+ * _Note: This value is a Piwik setting set by each user._
+ *
+ * @return string `'today'`, `'2010-01-01'`, etc.
+ * @api
+ */
+ public function getDefaultDate()
+ {
+ // NOTE: a change in this function might mean a change in plugins/UsersManager/javascripts/usersSettings.js as well
+ $userSettingsDate = APIUsersManager::getInstance()->getUserPreference(Piwik::getCurrentUserLogin(), APIUsersManager::PREFERENCE_DEFAULT_REPORT_DATE);
+ if ($userSettingsDate == 'yesterday') {
+ return $userSettingsDate;
+ }
+ // if last7, last30, etc.
+ if (strpos($userSettingsDate, 'last') === 0
+ || strpos($userSettingsDate, 'previous') === 0
+ ) {
+ return $userSettingsDate;
+ }
+ return 'today';
+ }
+
+ /**
+ * Returns default period type for Piwik reports.
+ *
+ * @return string `'day'`, `'week'`, `'month'`, `'year'` or `'range'`
+ * @api
+ */
+ public function getDefaultPeriod()
+ {
+ $userSettingsDate = APIUsersManager::getInstance()->getUserPreference(Piwik::getCurrentUserLogin(), APIUsersManager::PREFERENCE_DEFAULT_REPORT_DATE);
+ if ($userSettingsDate === false) {
+ return Config::getInstance()->General['default_period'];
+ }
+ if (in_array($userSettingsDate, array('today', 'yesterday'))) {
+ return 'day';
+ }
+ if (strpos($userSettingsDate, 'last') === 0
+ || strpos($userSettingsDate, 'previous') === 0
+ ) {
+ return 'range';
+ }
+ return $userSettingsDate;
+ }
+}
\ No newline at end of file
diff --git a/tests/PHPUnit/UI b/tests/PHPUnit/UI
index bf3580ee9fd..a29aec44747 160000
--- a/tests/PHPUnit/UI
+++ b/tests/PHPUnit/UI
@@ -1 +1 @@
-Subproject commit bf3580ee9fd2cbd904cd581409127581de5c87f2
+Subproject commit a29aec44747e85fd2e95aeefb5236db6561f01bf